From 7a27bf52bf7343c9395c111f97cf23707b8ba4f2 Mon Sep 17 00:00:00 2001 From: Hannes Heine Date: Wed, 24 Nov 2021 13:35:31 +0100 Subject: [PATCH] Change query to query builder withdrew table name. --- backend/src/graphql/resolver/AdminResolver.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/graphql/resolver/AdminResolver.ts b/backend/src/graphql/resolver/AdminResolver.ts index 48c6af226..9e296d92f 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -50,8 +50,8 @@ async function getUserCreations(id: number): Promise { // }) const transactionCreations = await getCustomRepository(TransactionCreationRepository) .createQueryBuilder() - .select(['SUM(login_pending_tasks_admin.amount)']) - .where('login_pending_tasks_admin.userId = :id', { id }) + .select(['SUM(amount)']) + .where('userId = :id', { id }) .getMany() console.log('transactionCreations', transactionCreations) // SELECT * FROM pending_creations WHERE userId = id