aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-07-05 13:35:54 +0300
committereug-vs <eug-vs@keemail.me>2020-07-05 13:35:54 +0300
commit1c2f3c9e5b39826266d64f4227e53fff139ea948 (patch)
treedf77b6f65247d87dbfde8000e918c83985624fc3
parent85b3cc20e8f453868d06d55a688ee8dfe90b80d4 (diff)
downloadwhich-api-1c2f3c9e5b39826266d64f4227e53fff139ea948.tar.gz
style: fix eslint errors
-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: {