From 3cd5ab27db6685d37ad4df98f3cefe71db0258c8 Mon Sep 17 00:00:00 2001 From: Hannes Heine Date: Wed, 24 Nov 2021 14:40:22 +0100 Subject: [PATCH] Change getRawOne to getOne. --- backend/src/graphql/resolver/AdminResolver.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/graphql/resolver/AdminResolver.ts b/backend/src/graphql/resolver/AdminResolver.ts index 9b49029e4..8e0d2b3b4 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -55,7 +55,7 @@ async function getUserCreations(id: number): Promise { .andWhere({ targetDate: Raw((alias) => `${alias} >= :date and ${alias} < :enddate`, { date: "2021-09-01", enddate: "2021-10-01" /* TODO: NOW().format("YYYY-MM") + '-01' - 2 Month */ }) }) - .getRawOne() + .getOne() console.log('createdAmountBeforeLastMonth', createdAmountBeforeLastMonth) const createdAmountLastMonth = await getCustomRepository(TransactionCreationRepository) @@ -65,7 +65,7 @@ async function getUserCreations(id: number): Promise { .andWhere({ targetDate: Raw((alias) => `${alias} >= :date and ${alias} < :enddate`, { date: "2021-10-01", enddate: "2021-11-01" /* TODO: NOW().format("YYYY-MM") + '-01' - 2 Month */ }) }) - .getRawOne() + .getOne() console.log('createdAmountLastMonth', createdAmountLastMonth) const createdAmountMonth = await getCustomRepository(TransactionCreationRepository) @@ -75,7 +75,7 @@ async function getUserCreations(id: number): Promise { .andWhere({ targetDate: Raw((alias) => `${alias} >= :date and ${alias} < :enddate`, { date: "2021-11-01", enddate: "2021-12-01" /* TODO: NOW().format("YYYY-MM") + '-01' - 2 Month */ }) }) - .getRawOne() + .getOne() console.log('createdAmountMonth', createdAmountMonth) // const transactionCreationsMonthQuery = await findAllUserTransactionCreations.andWhere({