mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-11 22:17:14 +03:00
Switched GET skipSegments to use params instead of JSON.
Body is not supported for GET requests.
This commit is contained in:
@@ -211,10 +211,12 @@ function getVoteOrganisedSponsorTimes(sponsorTimes, votes, UUIDs) {
|
||||
* @returns
|
||||
*/
|
||||
function handleGetSegments(req, res) {
|
||||
const videoID = req.body.videoID || req.query.videoID;
|
||||
const videoID = req.query.videoID;
|
||||
// Default to sponsor
|
||||
// If using params instead of JSON, only one category can be pulled
|
||||
const categories = req.body.categories || (req.query.category ? [req.query.category] : ["sponsor"]);
|
||||
const categories = req.query.categories ? JSON.parse(req.query.categories)
|
||||
: (req.query.category ? [req.query.category] : ["sponsor"]);
|
||||
|
||||
|
||||
/**
|
||||
* @type {Array<{
|
||||
|
||||
Reference in New Issue
Block a user