aboutsummaryrefslogtreecommitdiff
path: root/services/users/users.hooks.ts
blob: fc17ed726c2bdc69caa3cffa9fba7154f0d62475 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { hooks } from '@feathersjs/authentication-local';

const hashPassword = hooks.hashPassword('password');
const protectPassword = hooks.protect('password');

export default {
  after: {
    all: [protectPassword]
  },
  before: {
    create: [hashPassword],
    patch: [hashPassword],
    update: [hashPassword]
  }
};