From 6aa4737b6eb19fef6128d29bf711abc7c335cedb Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Thu, 9 Apr 2020 15:40:45 -0400 Subject: [PATCH] Fixed one category being empty causing a 404 --- src/routes/getSkipSegments.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/routes/getSkipSegments.js b/src/routes/getSkipSegments.js index e4f624f..1b4af64 100644 --- a/src/routes/getSkipSegments.js +++ b/src/routes/getSkipSegments.js @@ -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;