mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-08 04:27:09 +03:00
Fix vip downvotes unlocking
This commit is contained in:
@@ -104,7 +104,7 @@ export async function postBranding(req: Request, res: Response) {
|
||||
await verifyOldSubmissions(hashedUserID, verificationValue);
|
||||
}
|
||||
|
||||
if (isVip) {
|
||||
if (isVip && !downvote) {
|
||||
// unlock all other titles
|
||||
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]);
|
||||
@@ -152,7 +152,7 @@ export async function postBranding(req: Request, res: Response) {
|
||||
}
|
||||
}
|
||||
|
||||
if (isVip) {
|
||||
if (isVip && !downvote) {
|
||||
// unlock all other titles
|
||||
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]);
|
||||
|
||||
Reference in New Issue
Block a user