inverted property logic

This commit is contained in:
Miodec 2023-03-27 13:42:13 +02:00
parent 7035dfd6f1
commit f90a8f6e02
3 changed files with 3 additions and 3 deletions

View file

@ -151,7 +151,7 @@ router.post(
}),
checkUserPermissions({
criteria: (user) => {
return !user.cannotReport;
return user.canReport !== false;
},
}),
asyncHandler(QuoteController.reportQuote)

View file

@ -585,7 +585,7 @@ router.post(
}),
checkUserPermissions({
criteria: (user) => {
return !user.cannotReport;
return user.canReport !== false;
},
}),
asyncHandler(UserController.reportUser)

View file

@ -176,7 +176,7 @@ declare namespace MonkeyTypes {
uid: string;
quoteMod?: boolean;
configurationMod?: boolean;
cannotReport?: boolean;
canReport?: boolean;
banned?: boolean;
canManageApeKeys?: boolean;
favoriteQuotes?: Record<string, string[]>;