From ff25e16328f3d04d6d79d32fc64476d67d757dd8 Mon Sep 17 00:00:00 2001 From: Kyle Kemp Date: Thu, 21 Sep 2023 08:21:47 -0500 Subject: [PATCH] fix(lottery): ticket lottery shouldn't break the server anymore --- server/src/modules/lottery/buyinlottery.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/modules/lottery/buyinlottery.service.ts b/server/src/modules/lottery/buyinlottery.service.ts index 8c5c1fb..0be4868 100644 --- a/server/src/modules/lottery/buyinlottery.service.ts +++ b/server/src/modules/lottery/buyinlottery.service.ts @@ -71,7 +71,7 @@ export class BuyInLotteryService implements OnModuleInit { emCtx.persist(newRecord); await emCtx.flush(); - const winningTicket = await this.buyinTickets.findOne({ + const winningTicket = await emCtx.findOne(LotteryBuyInTicket, { ticketNumber: newRecord.ticketNumber, createdAt: { $gte: startOfToday() }, });