aboutsummaryrefslogtreecommitdiff
path: root/services/users
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-14 17:13:40 +0300
committereug-vs <eug-vs@keemail.me>2020-06-14 17:13:40 +0300
commit1ab199588d5353d98d49172e1f35d73452069faf (patch)
tree5699ba9d7e16b89e6ebefaf49d6992bb3eb6f3cd /services/users
parentfc4bdecdcd8abc7a2adaeb4b7f209f6930846ffa (diff)
downloadwhich-api-1ab199588d5353d98d49172e1f35d73452069faf.tar.gz
feat: protect password field
Diffstat (limited to 'services/users')
-rw-r--r--services/users/users.hooks.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/users/users.hooks.ts b/services/users/users.hooks.ts
index 06cbfde..fc17ed7 100644
--- a/services/users/users.hooks.ts
+++ b/services/users/users.hooks.ts
@@ -1,8 +1,12 @@
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],