mirror of
https://github.com/IT4Change/gradido.git
synced 2026-01-19 11:21:22 +00:00
Rename transaction link filters
– Fix spelling in comment.
This commit is contained in:
parent
b8aa75386f
commit
946280a6db
@ -3,11 +3,11 @@ import { ArgsType, Field } from 'type-graphql'
|
||||
@ArgsType()
|
||||
export default class TransactionLinkFilters {
|
||||
@Field(() => Boolean, { nullable: true, defaultValue: true })
|
||||
withDeleted?: boolean
|
||||
filterByDeleted?: boolean
|
||||
|
||||
@Field(() => Boolean, { nullable: true, defaultValue: true })
|
||||
withExpired?: boolean
|
||||
filterByExpired?: boolean
|
||||
|
||||
@Field(() => Boolean, { nullable: true, defaultValue: true })
|
||||
withRedeemed?: boolean
|
||||
filterByRedeemed?: boolean
|
||||
}
|
||||
|
||||
@ -442,11 +442,11 @@ export class AdminResolver {
|
||||
} = {
|
||||
userId,
|
||||
}
|
||||
if (!filters.withRedeemed) where.redeemedBy = null
|
||||
if (!filters.withExpired) where.validUntil = MoreThan(new Date())
|
||||
if (!filters.filterByRedeemed) where.redeemedBy = null
|
||||
if (!filters.filterByExpired) where.validUntil = MoreThan(new Date())
|
||||
const [transactionLinks, count] = await dbTransactionLink.findAndCount({
|
||||
where,
|
||||
withDeleted: filters.withDeleted,
|
||||
withDeleted: filters.filterByDeleted,
|
||||
order: {
|
||||
createdAt: order,
|
||||
},
|
||||
|
||||
@ -29,7 +29,7 @@ const context = {
|
||||
}
|
||||
|
||||
export const cleanDB = async () => {
|
||||
// this only works as lond we do not have foreign key constraints
|
||||
// this only works as long we do not have foreign key constraints
|
||||
for (let i = 0; i < entities.length; i++) {
|
||||
await resetEntity(entities[i])
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user