mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
some misssing changes
This commit is contained in:
parent
b887068226
commit
16c3ba399e
@ -5,6 +5,7 @@ import { Order } from '@enum/Order'
|
||||
import Paginated from '@arg/Paginated'
|
||||
import TransactionLinkFilters from '@arg/TransactionLinkFilters'
|
||||
import { TransactionLink, TransactionLinkResult } from '@model/TransactionLink'
|
||||
import { User } from '@/graphql/model/User'
|
||||
|
||||
export default async function transactionLinkList(
|
||||
{ currentPage = 1, pageSize = 5, order = Order.DESC }: Paginated,
|
||||
@ -18,7 +19,7 @@ export default async function transactionLinkList(
|
||||
}
|
||||
const [transactionLinks, count] = await DbTransactionLink.findAndCount({
|
||||
where: {
|
||||
user: user.id,
|
||||
userId: user.id,
|
||||
...(!withRedeemed && { redeemedBy: null }),
|
||||
...(!withExpired && { validUntil: MoreThan(new Date()) }),
|
||||
},
|
||||
@ -32,6 +33,6 @@ export default async function transactionLinkList(
|
||||
|
||||
return {
|
||||
count,
|
||||
links: transactionLinks.map((tl) => new TransactionLink(tl, user)),
|
||||
links: transactionLinks.map((tl) => new TransactionLink(tl, new User(user))),
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user