From 5d6caee37d9b5605e83fcd8817444cb49212ad7a Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 7 Mar 2023 17:56:25 +0100 Subject: [PATCH] remove creation transaction list --- backend/src/auth/RIGHTS.ts | 1 - .../graphql/resolver/ContributionResolver.ts | 27 ------------------- 2 files changed, 28 deletions(-) diff --git a/backend/src/auth/RIGHTS.ts b/backend/src/auth/RIGHTS.ts index 58a762028..e0c4a39a4 100644 --- a/backend/src/auth/RIGHTS.ts +++ b/backend/src/auth/RIGHTS.ts @@ -47,7 +47,6 @@ export enum RIGHTS { ADMIN_LIST_CONTRIBUTIONS = 'ADMIN_LIST_CONTRIBUTIONS', CONFIRM_CONTRIBUTION = 'CONFIRM_CONTRIBUTION', SEND_ACTIVATION_EMAIL = 'SEND_ACTIVATION_EMAIL', - CREATION_TRANSACTION_LIST = 'CREATION_TRANSACTION_LIST', LIST_TRANSACTION_LINKS_ADMIN = 'LIST_TRANSACTION_LINKS_ADMIN', CREATE_CONTRIBUTION_LINK = 'CREATE_CONTRIBUTION_LINK', DELETE_CONTRIBUTION_LINK = 'DELETE_CONTRIBUTION_LINK', diff --git a/backend/src/graphql/resolver/ContributionResolver.ts b/backend/src/graphql/resolver/ContributionResolver.ts index 016b850a9..0936ac9e7 100644 --- a/backend/src/graphql/resolver/ContributionResolver.ts +++ b/backend/src/graphql/resolver/ContributionResolver.ts @@ -551,33 +551,6 @@ export class ContributionResolver { return true } - @Authorized([RIGHTS.CREATION_TRANSACTION_LIST]) - @Query(() => ContributionListResult) - async creationTransactionList( - @Args() - { currentPage = 1, pageSize = 25, order = Order.DESC }: Paginated, - @Arg('userId', () => Int) userId: number, - ): Promise { - const offset = (currentPage - 1) * pageSize - const [contributionResult, count] = await getConnection() - .createQueryBuilder() - .select('c') - .from(DbContribution, 'c') - .leftJoinAndSelect('c.user', 'u') - .where(`user_id = ${userId}`) - .withDeleted() - .limit(pageSize) - .offset(offset) - .orderBy('c.created_at', order) - .getManyAndCount() - - return new ContributionListResult( - count, - contributionResult.map((contribution) => new Contribution(contribution, contribution.user)), - ) - // return userTransactions.map((t) => new Transaction(t, new User(user), communityUser)) - } - @Authorized([RIGHTS.OPEN_CREATIONS]) @Query(() => [OpenCreation]) async openCreations(