Prevent voting for highlight category

This commit is contained in:
Ajay Ramachandran
2021-04-05 22:33:28 -04:00
parent 6554e142cc
commit 7bf09906d3
2 changed files with 22 additions and 0 deletions

View File

@@ -170,6 +170,10 @@ async function categoryVote(UUID: SegmentUUID, userID: UserID, isVIP: boolean, i
res.status(400).send("Category doesn't exist.");
return;
}
if (category === "highlight") {
res.status(400).send("Cannot vote for this category");
return;
}
const nextCategoryInfo = await db.prepare("get", `select votes from "categoryVotes" where "UUID" = ? and category = ?`, [UUID, category]);