mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-08 05:03:39 +08:00
inverted property logic
This commit is contained in:
parent
7035dfd6f1
commit
f90a8f6e02
3 changed files with 3 additions and 3 deletions
|
|
@ -151,7 +151,7 @@ router.post(
|
|||
}),
|
||||
checkUserPermissions({
|
||||
criteria: (user) => {
|
||||
return !user.cannotReport;
|
||||
return user.canReport !== false;
|
||||
},
|
||||
}),
|
||||
asyncHandler(QuoteController.reportQuote)
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@ router.post(
|
|||
}),
|
||||
checkUserPermissions({
|
||||
criteria: (user) => {
|
||||
return !user.cannotReport;
|
||||
return user.canReport !== false;
|
||||
},
|
||||
}),
|
||||
asyncHandler(UserController.reportUser)
|
||||
|
|
|
|||
2
backend/src/types/types.d.ts
vendored
2
backend/src/types/types.d.ts
vendored
|
|
@ -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[]>;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue