From eb9afd9377ffd8429dd47f997fd75bebc22cbfd3 Mon Sep 17 00:00:00 2001 From: Harminder Virk Date: Fri, 8 Dec 2017 12:59:47 +0530 Subject: [PATCH] fix(hooks): use beforeCreate over beforeSave --- app/Models/User.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/User.js b/app/Models/User.js index 53ec9a8..190c359 100644 --- a/app/Models/User.js +++ b/app/Models/User.js @@ -13,7 +13,7 @@ class User extends Model { * Look at `app/Models/Hooks/User.js` file to * check the hashPassword method */ - this.addHook('beforeSave', 'User.hashPassword') + this.addHook('beforeCreate', 'User.hashPassword') } /**