mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 13:37:01 +03:00
Merge branch 'experimental' of https://github.com/ajayyy/SponsorBlockServer
This commit is contained in:
@@ -197,14 +197,17 @@ module.exports = async function postSkipSegments(req, res) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//check to see if the user has already submitted sponsors for this video
|
// Disable max submissions for now
|
||||||
let duplicateCheckRow = db.prepare("SELECT COUNT(*) as count FROM sponsorTimes WHERE userID = ? and videoID = ?").get([userID, videoID]);
|
if (false) {
|
||||||
|
//check to see if the user has already submitted sponsors for this video
|
||||||
if (duplicateCheckRow.count >= 16) {
|
let duplicateCheckRow = db.prepare("SELECT COUNT(*) as count FROM sponsorTimes WHERE userID = ? and videoID = ?").get([userID, videoID]);
|
||||||
//too many sponsors for the same video from the same user
|
|
||||||
res.sendStatus(429);
|
if (duplicateCheckRow.count >= 16) {
|
||||||
|
//too many sponsors for the same video from the same user
|
||||||
|
res.sendStatus(429);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//check to see if this user is shadowbanned
|
//check to see if this user is shadowbanned
|
||||||
|
|||||||
Reference in New Issue
Block a user