mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2026-02-01 07:10:55 +03:00
Vip locked segment voting, handle client side
Co-authored-by: Ajay Ramachandran <dev@ajay.app>
This commit is contained in:
@@ -178,10 +178,8 @@ async function categoryVote(UUID: SegmentUUID, userID: UserID, isVIP: boolean, i
|
|||||||
|
|
||||||
// Ignore vote if the next category is locked
|
// Ignore vote if the next category is locked
|
||||||
const nextCategoryLocked = await db.prepare("get", `SELECT "videoID", "category" FROM "lockCategories" WHERE "videoID" = ? AND "category" = ?`, [videoInfo.videoID, category]);
|
const nextCategoryLocked = await db.prepare("get", `SELECT "videoID", "category" FROM "lockCategories" WHERE "videoID" = ? AND "category" = ?`, [videoInfo.videoID, category]);
|
||||||
if (nextCategoryLocked) {
|
if (nextCategoryLocked && !isVIP) {
|
||||||
if (!isVIP) {
|
|
||||||
return res.sendStatus(200);
|
return res.sendStatus(200);
|
||||||
} // In an else statement, add a warning in the future for VIPs, that the next category is locked
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ignore vote if the segment is locked
|
// Ignore vote if the segment is locked
|
||||||
|
|||||||
Reference in New Issue
Block a user