fix(hooks): use beforeCreate over beforeSave

This commit is contained in:
Harminder Virk 2017-12-08 12:59:47 +05:30 committed by Harminder
parent 1af4034a3b
commit eb9afd9377

View File

@ -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')
}
/**