add addUserAsTempVIP

This commit is contained in:
Michael C
2021-12-31 04:26:37 -05:00
parent 9ae16ea9b6
commit a1d28fbfe1
10 changed files with 277 additions and 4 deletions

View File

@@ -322,7 +322,7 @@ export async function voteOnSponsorTime(req: Request, res: Response): Promise<Re
//check if this user is on the vip list
const videoID = await db.prepare("get", `select "videoID" from "sponsorTimes" where "UUID" = ?`, [UUID]);
const isTempVIP = await isUserTempVIP(nonAnonUserID, videoID);
const isTempVIP = await isUserTempVIP(nonAnonUserID, videoID?.videoID || null);
const isVIP = await isUserVIP(nonAnonUserID) || isTempVIP;
//check if user voting on own submission