Rename transaction link filters

– Fix spelling in comment.
This commit is contained in:
Wolfgang Huß 2022-05-16 12:00:57 +02:00
parent b8aa75386f
commit 946280a6db
3 changed files with 7 additions and 7 deletions

View File

@ -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
}

View File

@ -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,
},

View File

@ -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])
}