From 1c2f3c9e5b39826266d64f4227e53fff139ea948 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 5 Jul 2020 13:35:54 +0300 Subject: style: fix eslint errors --- populateDb.ts | 2 +- services/users/users.hooks.ts | 4 ++-- 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 => { 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 => { }; const compareUser = async (context: HookContext): Promise => { - 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: { -- cgit v1.2.3