diff --git a/backend/src/graphql/arg/TransactionLinkFilters.ts b/backend/src/graphql/arg/TransactionLinkFilters.ts index e2f752d3f..b009a3180 100644 --- a/backend/src/graphql/arg/TransactionLinkFilters.ts +++ b/backend/src/graphql/arg/TransactionLinkFilters.ts @@ -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 } diff --git a/backend/src/graphql/resolver/AdminResolver.ts b/backend/src/graphql/resolver/AdminResolver.ts index 8da92a61c..d0dc3f442 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -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, }, diff --git a/backend/src/seeds/index.ts b/backend/src/seeds/index.ts index f26000e06..11993c03e 100644 --- a/backend/src/seeds/index.ts +++ b/backend/src/seeds/index.ts @@ -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]) }