From 0a6a6be1b43635c60e76669ac2a7ee8581d9b183 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 27 Jun 2020 16:40:07 +0300 Subject: style: fix linting errors --- hooks/isAuthenticated.ts | 2 -- hooks/requireAuth.ts | 4 +++- services/feed/feed.hooks.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hooks/isAuthenticated.ts b/hooks/isAuthenticated.ts index d0da8b6..50290c8 100644 --- a/hooks/isAuthenticated.ts +++ b/hooks/isAuthenticated.ts @@ -1,6 +1,4 @@ import { HookContext } from '@feathersjs/feathers'; -import { authenticate } from '@feathersjs/authentication'; - export default async (context: HookContext): Promise => { console.log(context.params.authenticated); diff --git a/hooks/requireAuth.ts b/hooks/requireAuth.ts index ac46e22..ba08f57 100644 --- a/hooks/requireAuth.ts +++ b/hooks/requireAuth.ts @@ -4,6 +4,8 @@ import isAuthenticated from './isAuthenticated'; export default iff( isNot(isAuthenticated), - () => { throw new NotAuthenticated('This endpoint requires auth!') } + () => { + throw new NotAuthenticated('This endpoint requires auth!'); + } ); diff --git a/services/feed/feed.hooks.ts b/services/feed/feed.hooks.ts index 33c6e71..54f6d61 100644 --- a/services/feed/feed.hooks.ts +++ b/services/feed/feed.hooks.ts @@ -1,6 +1,6 @@ import _ from 'lodash'; import { HookContext } from '@feathersjs/feathers'; -import { iff, combine } from 'feathers-hooks-common'; +import { iff } from 'feathers-hooks-common'; import isAuthenticated from '../../hooks/isAuthenticated'; const raiseNewVerifedPolls = async (context: HookContext): Promise => { @@ -25,7 +25,7 @@ export default { after: { find: [ iff(isAuthenticated, raiseNewVerifedPolls), - iff(isAuthenticated, lowerOldPolls), + iff(isAuthenticated, lowerOldPolls) ] } }; -- cgit v1.2.3