Correct description to match example

The description doesn't match the example. The example is correct
This commit is contained in:
Steven Kaspar 2018-03-23 08:39:38 -05:00 committed by GitHub
parent 88008ea900
commit e3f9772525
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -621,7 +621,7 @@ Callbacks on `destroy`:
#### Mongoose
Each of these functions receives a parameter called `next`, which is the callback you should call after your logic is executed. The entry is accessible through `this`.
The entry is available through the `model` parameter
**Path —** `./api/user/models/User.js`.
```js
@ -631,7 +631,7 @@ module.exports = {
*/
beforeCreate: async (model) => {
// Hash password.
const passwordHashed = await strapi.api.user.services.user.hashPassword(this.password);
const passwordHashed = await strapi.api.user.services.user.hashPassword(model.password);
// Set the password.
model.password = passwordHashed;