mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-11 05:57:04 +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
|
* @returns
|
||||||
*/
|
*/
|
||||||
function handleGetSegments(req, res) {
|
function handleGetSegments(req, res) {
|
||||||
const videoID = req.body.videoID || req.query.videoID;
|
const videoID = req.query.videoID;
|
||||||
// Default to sponsor
|
// Default to sponsor
|
||||||
// If using params instead of JSON, only one category can be pulled
|
// 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<{
|
* @type {Array<{
|
||||||
|
|||||||
Reference in New Issue
Block a user