fix terminal ocm ranking bug
This commit is contained in:
parent
a243e49015
commit
17d3c920d7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user