1
0
mirror of synced 2024-09-24 11:18:22 +02: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,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;