1
0
mirror of synced 2024-11-12 01:10:47 +01:00

fix terminal ocm ranking bug

This commit is contained in:
ghkkk090 2022-09-01 18:42:15 +07:00
parent a243e49015
commit 17d3c920d7

View File

@ -583,32 +583,11 @@ 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');
}
}
// Declare GhostCompetitionSchedule
let compeSch;
let msg: any;