From a52feee25e8b1d09e600624a73fb61a19f71f418 Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 31 Mar 2023 15:07:34 -0400 Subject: [PATCH] Fix unlocking all submissions --- src/routes/postBranding.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/postBranding.ts b/src/routes/postBranding.ts index 8307615..b0bca3a 100644 --- a/src/routes/postBranding.ts +++ b/src/routes/postBranding.ts @@ -63,7 +63,7 @@ export async function postBranding(req: Request, res: Response) { if (isVip) { // unlock all other titles - await db.prepare("run", `UPDATE "titleVotes" SET "locked" = 0 WHERE "UUID" != ?`, [UUID]); + await db.prepare("run", `UPDATE "titleVotes" SET "locked" = 0 WHERE "UUID" != ? AND "videoID" = ?`, [UUID, videoID]); } } })(), (async () => { @@ -91,7 +91,7 @@ export async function postBranding(req: Request, res: Response) { if (isVip) { // unlock all other titles - await db.prepare("run", `UPDATE "thumbnailVotes" SET "locked" = 0 WHERE "UUID" != ?`, [UUID]); + await db.prepare("run", `UPDATE "thumbnailVotes" SET "locked" = 0 WHERE "UUID" != ? AND "videoID" = ?`, [UUID, videoID]); } } }