mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-11 22:17:14 +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)
|
const categories = req.query.categories ? JSON.parse(req.query.categories)
|
||||||
: (req.query.category ? [req.query.category] : ["sponsor"]);
|
: (req.query.category ? [req.query.category] : ["sponsor"]);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {Array<{
|
* @type {Array<{
|
||||||
* segment: number[],
|
* segment: number[],
|
||||||
@@ -264,11 +263,6 @@ function handleGetSegments(req, res) {
|
|||||||
UUIDs.push(rows[i].UUID);
|
UUIDs.push(rows[i].UUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sponsorTimes.length == 0) {
|
|
||||||
res.sendStatus(404);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
organisedData = getVoteOrganisedSponsorTimes(sponsorTimes, votes, UUIDs);
|
organisedData = getVoteOrganisedSponsorTimes(sponsorTimes, votes, UUIDs);
|
||||||
sponsorTimes = organisedData.sponsorTimes;
|
sponsorTimes = organisedData.sponsorTimes;
|
||||||
UUIDs = organisedData.UUIDs;
|
UUIDs = organisedData.UUIDs;
|
||||||
|
|||||||
Reference in New Issue
Block a user