From 17d3c920d7e254b6ca8a61bef4be794bbc07a02d Mon Sep 17 00:00:00 2001 From: ghkkk090 Date: Thu, 1 Sep 2022 18:42:15 +0700 Subject: [PATCH] fix terminal ocm ranking bug --- src/modules/terminal.ts | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/src/modules/terminal.ts b/src/modules/terminal.ts index ea8e4d6..e458aaa 100644 --- a/src/modules/terminal.ts +++ b/src/modules/terminal.ts @@ -583,31 +583,10 @@ export default class TerminalModule extends Module { // Get current active OCM Event let ocmEventDate = await prisma.oCMEvent.findFirst({ - where: { - // qualifyingPeriodStartAt is less than current date - qualifyingPeriodStartAt: { lte: date }, - - // competitionEndAt is greater than current date - competitionEndAt: { gte: date }, - }, - orderBy:{ - dbId: 'desc' - } - }); - - if(!(ocmEventDate)) - { - ocmEventDate = await prisma.oCMEvent.findFirst({ - where:{ - competitionId: body.competitionId - } - }); - - if(ocmEventDate) - { - console.log('Previous OCM found'); + where:{ + competitionId: body.competitionId } - } + }); // Declare GhostCompetitionSchedule let compeSch;