mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-08 20:47:02 +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);
|
startTime = parseFloat(startTime);
|
||||||
endTime = parseFloat(endTime);
|
endTime = parseFloat(endTime);
|
||||||
|
|
||||||
|
if (startTime == NaN || endTime == NaN) {
|
||||||
|
//invalid request
|
||||||
|
res.sendStatus(400);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (startTime > endTime) {
|
if (startTime > endTime) {
|
||||||
//time can't go backwards
|
//time can't go backwards
|
||||||
res.sendStatus(400);
|
res.sendStatus(400);
|
||||||
|
|||||||
Reference in New Issue
Block a user