Prevented backwards sponsor times.

This commit is contained in:
Ajay Ramachandran
2019-07-25 16:54:43 -04:00
parent d7dec47de7
commit 7e041e5b49

View File

@@ -109,6 +109,11 @@ app.get('/api/postVideoSponsorTimes', function (req, res) {
startTime = parseFloat(startTime);
endTime = parseFloat(endTime);
if (startTime > endTime) {
//time can't go backwards
res.sendStatus(400);
}
//this can just be a hash of the data
//it's better than generating an actual UUID like what was used before
//also better for duplication checking