We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1af9807 commit ea35b24Copy full SHA for ea35b24
services/users/users.hooks.ts
@@ -1,7 +1,14 @@
1
import { hooks } from '@feathersjs/authentication-local';
2
+import { HookContext } from '@feathersjs/feathers';
3
4
const hashPassword = hooks.hashPassword('password');
-const protectPassword = hooks.protect('password');
5
+
6
+const protectPassword = async (context: HookContext): Promise<HookContext> => {
7
+ const { dispatch } = hooks.protect('password')(context);
8
+ context.result = dispatch;
9
+ context.dispatch = dispatch;
10
+ return context;
11
+}
12
13
export default {
14
after: {
0 commit comments