mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-13 23:17:02 +03:00
Adding check to only allow a list of categories
This commit is contained in:
@@ -150,6 +150,11 @@ function categoryVote(UUID, userID, isVIP, category, hashedIP, res) {
|
||||
res.status("400").send("Submission doesn't exist.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!config.categoryList.includes(category)) {
|
||||
res.status("400").send("Category doesn't exist.");
|
||||
return;
|
||||
}
|
||||
|
||||
let timeSubmitted = Date.now();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user