From 7e23bc9eeb5c0f048a7af409d12fc68774e5d319 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sun, 3 Oct 2021 13:12:14 -0400 Subject: [PATCH] Check for service in category vote --- src/routes/voteOnSponsorTime.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/voteOnSponsorTime.ts b/src/routes/voteOnSponsorTime.ts index eb04ac1..2d12115 100644 --- a/src/routes/voteOnSponsorTime.ts +++ b/src/routes/voteOnSponsorTime.ts @@ -177,7 +177,7 @@ async function categoryVote(UUID: SegmentUUID, userID: UserID, isVIP: boolean, i } // 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) { return res.sendStatus(200); }