diff --git a/docs/3.x.x/en/guides/models.md b/docs/3.x.x/en/guides/models.md index 1c455b6c33..96eeb0e8c3 100644 --- a/docs/3.x.x/en/guides/models.md +++ b/docs/3.x.x/en/guides/models.md @@ -651,12 +651,11 @@ module.exports = { * Triggered before user creation. */ beforeCreate: async (model, attrs, options) => { - // Hash password. - const passwordHashed = await strapi.api.user.services.user.hashPassword(model.attributes.password); + // Hash password. + const passwordHashed = await strapi.api.user.services.user.hashPassword(model.attributes.password); - // Set the password. - model.set('password', passwordHashed); - }); + // Set the password. + model.set('password', passwordHashed); } } ```