aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--populateDb.ts2
-rw-r--r--services/users/users.hooks.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/populateDb.ts b/populateDb.ts
index de7ead9..1565f44 100644
--- a/populateDb.ts
+++ b/populateDb.ts
@@ -56,7 +56,7 @@ const createPoll = (authorId: string): Promise<Poll> => {
contents: {
left: generateImageData(),
right: generateImageData()
- },
+ }
}, { user: { _id: authorId }, authenticated: true });
};
diff --git a/services/users/users.hooks.ts b/services/users/users.hooks.ts
index 1b4be2b..125f418 100644
--- a/services/users/users.hooks.ts
+++ b/services/users/users.hooks.ts
@@ -15,11 +15,11 @@ const ignoreCaseRegex = async (context: HookContext): Promise<HookContext> => {
};
const compareUser = async (context: HookContext): Promise<HookContext> => {
- if(context.arguments[0] != context.params.user._id) {
+ if (context.arguments[0] !== context.params.user._id) {
throw new NotAuthenticated('You can only PATCH/UPDATE your own user!');
}
return context;
-}
+};
export default {
after: {