mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-27 01:48:33 +03:00
Fix can vote checks
This commit is contained in:
@@ -56,8 +56,10 @@ export async function postBranding(req: Request, res: Response) {
|
||||
const hashedIP = await getHashCache(getIP(req) + config.globalSalt as IPAddress);
|
||||
const isBanned = await checkBanStatus(hashedUserID, hashedIP);
|
||||
|
||||
if (!await canVote(hashedUserID)) {
|
||||
res.status(200).send("OK");
|
||||
const permission = await canVote(hashedUserID);
|
||||
if (!permission.canSubmit) {
|
||||
res.status(403).send(permission.reason);
|
||||
return;
|
||||
}
|
||||
|
||||
if (videoDuration && thumbnail && await checkForWrongVideoDuration(videoID, videoDuration)) {
|
||||
|
||||
Reference in New Issue
Block a user