aboutsummaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'hooks')
-rw-r--r--hooks/isAuthenticated.ts2
-rw-r--r--hooks/requireAuth.ts4
2 files changed, 3 insertions, 3 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<boolean> => {
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!');
+ }
);