mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 21:47:02 +03:00
Fixed one category being empty causing a 404
This commit is contained in:
@@ -217,7 +217,6 @@ function handleGetSegments(req, res) {
|
||||
const categories = req.query.categories ? JSON.parse(req.query.categories)
|
||||
: (req.query.category ? [req.query.category] : ["sponsor"]);
|
||||
|
||||
|
||||
/**
|
||||
* @type {Array<{
|
||||
* segment: number[],
|
||||
@@ -264,11 +263,6 @@ function handleGetSegments(req, res) {
|
||||
UUIDs.push(rows[i].UUID);
|
||||
}
|
||||
|
||||
if (sponsorTimes.length == 0) {
|
||||
res.sendStatus(404);
|
||||
return false;
|
||||
}
|
||||
|
||||
organisedData = getVoteOrganisedSponsorTimes(sponsorTimes, votes, UUIDs);
|
||||
sponsorTimes = organisedData.sponsorTimes;
|
||||
UUIDs = organisedData.UUIDs;
|
||||
|
||||
Reference in New Issue
Block a user