Check for service in category vote

This commit is contained in:
Ajay Ramachandran
2021-10-03 13:12:14 -04:00
parent 658e391f50
commit 7e23bc9eeb

View File

@@ -177,7 +177,7 @@ 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 "service" = ? AND "category" = ?`, [videoInfo.videoID, videoInfo.service, category]);
if (nextCategoryLocked && !isVIP) { if (nextCategoryLocked && !isVIP) {
return res.sendStatus(200); return res.sendStatus(200);
} }