mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-07 03:57:06 +03:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1148803671 | ||
|
|
4379660b01 |
6
index.js
6
index.js
@@ -109,6 +109,12 @@ app.get('/api/postVideoSponsorTimes', function (req, res) {
|
||||
startTime = parseFloat(startTime);
|
||||
endTime = parseFloat(endTime);
|
||||
|
||||
if (startTime == NaN || endTime == NaN) {
|
||||
//invalid request
|
||||
res.sendStatus(400);
|
||||
return;
|
||||
}
|
||||
|
||||
if (startTime > endTime) {
|
||||
//time can't go backwards
|
||||
res.sendStatus(400);
|
||||
|
||||
Reference in New Issue
Block a user