mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Fix titles and thumbnails being unlocked
This commit is contained in:
parent
4477ab7ca6
commit
59d9ed390f
1 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ export async function postBranding(req: Request, res: Response) {
|
|||
if (shouldLock) {
|
||||
await db.prepare("run", `UPDATE "titleVotes" as tv SET "locked" = 0 FROM "titles" t WHERE tv."UUID" = t."UUID" AND tv."UUID" != ? AND t."videoID" = ?`, [UUID, videoID]);
|
||||
} else {
|
||||
await db.prepare("run", `UPDATE "titleVotes" as tv SET "locked" = 0 FROM "titles" t WHERE t."videoID" = ?`, [videoID]);
|
||||
await db.prepare("run", `UPDATE "titleVotes" as tv SET "locked" = 0 FROM "titles" t WHERE tv."UUID" = t."UUID" AND t."videoID" = ?`, [videoID]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ export async function postBranding(req: Request, res: Response) {
|
|||
if (shouldLock) {
|
||||
await db.prepare("run", `UPDATE "thumbnailVotes" as tv SET "locked" = 0 FROM "thumbnails" t WHERE tv."UUID" = t."UUID" AND tv."UUID" != ? AND t."videoID" = ?`, [UUID, videoID]);
|
||||
} else {
|
||||
await db.prepare("run", `UPDATE "thumbnailVotes" as tv SET "locked" = 0 FROM "thumbnails" t WHERE t."videoID" = ?`, [videoID]);
|
||||
await db.prepare("run", `UPDATE "thumbnailVotes" as tv SET "locked" = 0 FROM "thumbnails" t WHERE tv."UUID" = t."UUID" AND t."videoID" = ?`, [videoID]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue