From ee94c655ef80064391aadc083a40e151c3a37108 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 8 Feb 2022 15:59:59 +0100 Subject: [PATCH] fix elopage buys not using repository but entity --- backend/src/util/hasElopageBuys.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/src/util/hasElopageBuys.ts b/backend/src/util/hasElopageBuys.ts index 624cd0815..4e23e717c 100644 --- a/backend/src/util/hasElopageBuys.ts +++ b/backend/src/util/hasElopageBuys.ts @@ -1,8 +1,6 @@ -import { getCustomRepository } from '@dbTools/typeorm' -import { LoginElopageBuysRepository } from '../typeorm/repository/LoginElopageBuys' +import { LoginElopageBuys } from '@entity/LoginElopageBuys' export async function hasElopageBuys(email: string): Promise { - const loginElopageBuysRepository = getCustomRepository(LoginElopageBuysRepository) - const elopageBuyCount = await loginElopageBuysRepository.count({ payerEmail: email }) + const elopageBuyCount = await LoginElopageBuys.count({ payerEmail: email }) return elopageBuyCount > 0 }