Skip to content

Commit b2f7e1b

Browse files
committed
Fix locked check for thumbnail downvotes
1 parent 47ea6ae commit b2f7e1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/postBranding.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export async function postBranding(req: Request, res: Response) {
120120
? (await db.prepare("get", `SELECT "UUID" from "thumbnails" where "videoID" = ? AND "original" = 1`, [videoID]))?.UUID
121121
: (await db.prepare("get", `SELECT "thumbnails"."UUID" from "thumbnailTimestamps" JOIN "thumbnails" ON "thumbnails"."UUID" = "thumbnailTimestamps"."UUID"
122122
WHERE "thumbnailTimestamps"."timestamp" = ? AND "thumbnails"."videoID" = ?`, [(thumbnail as TimeThumbnailSubmission).timestamp, videoID]))?.UUID;
123-
const existingIsLocked = !!existingUUID && (await db.prepare("get", `SELECT "locked" from "titleVotes" where "UUID" = ?`, [existingUUID]))?.locked;
123+
const existingIsLocked = !!existingUUID && (await db.prepare("get", `SELECT "locked" from "thumbnailVotes" where "UUID" = ?`, [existingUUID]))?.locked;
124124
if (existingUUID != undefined && isBanned) return; // ignore votes on existing details from banned users
125125
if (downvote && existingIsLocked && !isVip) {
126126
errorCode = 403;

0 commit comments

Comments
 (0)