mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Fix vip downvotes unlocking
This commit is contained in:
parent
d5ebd8ec1a
commit
a921085da6
1 changed files with 2 additions and 2 deletions
|
@ -104,7 +104,7 @@ export async function postBranding(req: Request, res: Response) {
|
||||||
await verifyOldSubmissions(hashedUserID, verificationValue);
|
await verifyOldSubmissions(hashedUserID, verificationValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isVip) {
|
if (isVip && !downvote) {
|
||||||
// unlock all other titles
|
// unlock all other titles
|
||||||
if (shouldLock) {
|
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]);
|
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]);
|
||||||
|
@ -152,7 +152,7 @@ export async function postBranding(req: Request, res: Response) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isVip) {
|
if (isVip && !downvote) {
|
||||||
// unlock all other titles
|
// unlock all other titles
|
||||||
if (shouldLock) {
|
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]);
|
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]);
|
||||||
|
|
Loading…
Reference in a new issue