add gap between qualifying and main draw if the gap is less than 1 hour
This commit is contained in:
parent
eec96bd011
commit
d65c0503f0
@ -103,15 +103,17 @@ export default class GhostModule extends Module {
|
||||
competitionPeriodStartTimestamp = competitionPeriodEndTimeStamp + ocmEventDate.lengthOfInterval;
|
||||
}
|
||||
|
||||
if(ocmEventDate.lengthOfInterval !== 0)
|
||||
// Check the gap between quali close and main draw start timestamp
|
||||
let checkQualiMainGap = ocmEventDate.competitionStartAt - ocmEventDate.qualifyingPeriodCloseAt;
|
||||
if(checkQualiMainGap < 3600)
|
||||
{
|
||||
let qualifyingEndTimeStamp = ocmEventDate.qualifyingPeriodCloseAt - ocmEventDate.lengthOfInterval
|
||||
let changeTime = ocmEventDate.competitionStartAt - 3600;
|
||||
await prisma.oCMEvent.update({
|
||||
where:{
|
||||
dbId: ocmEventDate.dbId
|
||||
},
|
||||
data:{
|
||||
qualifyingPeriodCloseAt: qualifyingEndTimeStamp
|
||||
qualifyingPeriodCloseAt: changeTime
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user