We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96398e5 commit 4eaced8Copy full SHA for 4eaced8
services/users/users.hooks.ts
@@ -15,7 +15,7 @@ const ignoreCaseRegex = async (context: HookContext): Promise<HookContext> => {
15
};
16
17
const compareUser = async (context: HookContext): Promise<HookContext> => {
18
- if (context.arguments[0] !== context.params.user._id) {
+ if (context.id !== context.params.user._id.toString()) {
19
throw new NotAuthenticated('You can only PATCH/UPDATE your own user!');
20
}
21
return context;
0 commit comments