Merge pull request #63 from Joe-Dowd/more-sponsortime-checks

Bug Fix: Don't allow Infinity to be passed into the database as a sponsor time.
This commit is contained in:
Ajay Ramachandran
2020-03-17 23:50:43 -04:00
committed by GitHub

View File

@@ -167,6 +167,12 @@ async function submitSponsorTimes(req, res) {
return;
}
if (startTime === Infinity || endTime === Infinity) {
//invalid request
res.sendStatus(400);
return;
}
if (startTime > endTime) {
//time can't go backwards
res.sendStatus(400);