Skip to content

Commit 4eaced8

Browse files
committed
hotfix: compareUser ts error
1 parent 96398e5 commit 4eaced8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/users/users.hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const ignoreCaseRegex = async (context: HookContext): Promise<HookContext> => {
1515
};
1616

1717
const compareUser = async (context: HookContext): Promise<HookContext> => {
18-
if (context.arguments[0] !== context.params.user._id) {
18+
if (context.id !== context.params.user._id.toString()) {
1919
throw new NotAuthenticated('You can only PATCH/UPDATE your own user!');
2020
}
2121
return context;

0 commit comments

Comments
 (0)