aboutsummaryrefslogtreecommitdiff
path: root/hooks/isAuthenticated.ts
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/isAuthenticated.ts')
-rw-r--r--hooks/isAuthenticated.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/hooks/isAuthenticated.ts b/hooks/isAuthenticated.ts
new file mode 100644
index 0000000..50290c8
--- /dev/null
+++ b/hooks/isAuthenticated.ts
@@ -0,0 +1,7 @@
+import { HookContext } from '@feathersjs/feathers';
+
+export default async (context: HookContext): Promise<boolean> => {
+ console.log(context.params.authenticated);
+ return context.params.authenticated || false;
+};
+