diff --git a/backend/src/graphql/resolver/AdminResolver.ts b/backend/src/graphql/resolver/AdminResolver.ts index 9944e726c..2e867369f 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -49,7 +49,7 @@ async function getUserCreations(id: number): Promise { // targetDate: Raw((alias) => `${alias} > :date`, { date: "2021-09-01" /* TODO: NOW().format("YYYY-MM") + '-01' - 2 Month */ }), // }) const createdAmountBeforeLastMonth = await getCustomRepository(TransactionCreationRepository) - .createQueryBuilder('transaction_creations') + .createQueryBuilder() .select('SUM(transaction_creations.amount)', 'sum') .where('transaction_creations.state_user_id = :id', { id }) .andWhere({ @@ -57,7 +57,7 @@ async function getUserCreations(id: number): Promise { }) .getRawOne() console.log('createdAmountBeforeLastMonth', createdAmountBeforeLastMonth) - + const createdAmountLastMonth = await getCustomRepository(TransactionCreationRepository) .createQueryBuilder('transaction_creations') .select('SUM(transaction_creations.amount)', 'sum')