mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-14 15:37:07 +03:00
Made it send 404 when nothing is found
This commit is contained in:
12
index.js
12
index.js
@@ -37,10 +37,14 @@ app.get('/api/getVideoSponsorTimes', function (req, res) {
|
|||||||
sponsorTimes[i][1] = rows[i].endTime;
|
sponsorTimes[i][1] = rows[i].endTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
//send result
|
if (sponsorTimes == []) {
|
||||||
res.send({
|
res.sendStatus(404);
|
||||||
sponsorTimes: sponsorTimes
|
} else {
|
||||||
})
|
//send result
|
||||||
|
res.send({
|
||||||
|
sponsorTimes: sponsorTimes
|
||||||
|
})
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user