fix(hooks): use beforeCreate over beforeSave
This commit is contained in:
parent
1af4034a3b
commit
eb9afd9377
|
@ -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')
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user