voteOnSponsorTime: add ban check to categoryVote

This commit is contained in:
mini-bomba
2022-07-14 20:22:44 +02:00
parent 39ad5fb62a
commit 70c98e0819

View File

@@ -247,7 +247,8 @@ async function categoryVote(UUID: SegmentUUID, userID: UserID, isVIP: boolean, i
const timeSubmitted = Date.now();
const voteAmount = (isVIP || isTempVIP) ? 500 : 1;
const ableToVote = isVIP || isTempVIP || finalResponse.finalStatus === 200 || true;
const ableToVote = finalResponse.finalStatus === 200
&& (await db.prepare("get", `SELECT "userID" FROM "shadowBannedUsers" WHERE "userID" = ?`, [userID])) === undefined;
if (ableToVote) {
// Add the vote