mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
also list depricated links
This commit is contained in:
parent
0267a31515
commit
5d21c25240
@ -2,7 +2,7 @@
|
|||||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||||
|
|
||||||
import { Resolver, Args, Arg, Authorized, Ctx, Mutation, Query } from 'type-graphql'
|
import { Resolver, Args, Arg, Authorized, Ctx, Mutation, Query } from 'type-graphql'
|
||||||
import { getCustomRepository, MoreThan } from '@dbTools/typeorm'
|
import { getCustomRepository } from '@dbTools/typeorm'
|
||||||
import { TransactionLink } from '@model/TransactionLink'
|
import { TransactionLink } from '@model/TransactionLink'
|
||||||
import { TransactionLink as dbTransactionLink } from '@entity/TransactionLink'
|
import { TransactionLink as dbTransactionLink } from '@entity/TransactionLink'
|
||||||
import { User as dbUser } from '@entity/User'
|
import { User as dbUser } from '@entity/User'
|
||||||
@ -117,12 +117,12 @@ export class TransactionLinkResolver {
|
|||||||
): Promise<TransactionLink[]> {
|
): Promise<TransactionLink[]> {
|
||||||
const userRepository = getCustomRepository(UserRepository)
|
const userRepository = getCustomRepository(UserRepository)
|
||||||
const user = await userRepository.findByPubkeyHex(context.pubKey)
|
const user = await userRepository.findByPubkeyHex(context.pubKey)
|
||||||
const now = new Date()
|
// const now = new Date()
|
||||||
const transactionLinks = await dbTransactionLink.find({
|
const transactionLinks = await dbTransactionLink.find({
|
||||||
where: {
|
where: {
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
redeemedBy: null,
|
redeemedBy: null,
|
||||||
validUntil: MoreThan(now),
|
// validUntil: MoreThan(now),
|
||||||
},
|
},
|
||||||
order: {
|
order: {
|
||||||
createdAt: order,
|
createdAt: order,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user