diff --git a/docs/3.0.0-beta.x/guides/send-email.md b/docs/3.0.0-beta.x/guides/send-email.md index 2e6b3e70ac..bb55a525d5 100644 --- a/docs/3.0.0-beta.x/guides/send-email.md +++ b/docs/3.0.0-beta.x/guides/send-email.md @@ -100,10 +100,10 @@ module.exports = { entity = await strapi.services.comment.create(ctx.request.body); } - entry = sanitizeEntity(entity, { model: strapi.models.comment }); + entity = sanitizeEntity(entity, { model: strapi.models.comment }); // check if the comment content contains a bad word - if (entry.content !== filter.clean(entry.content)) { + if (entity.content !== filter.clean(entity.content)) { // send an email by using the email plugin await strapi.plugins['email'].services.email.send({ @@ -111,15 +111,15 @@ module.exports = { from: 'admin@strapi.io' subject: 'Comment posted that contains a bad words', text: ` - The comment #${entry.id} contain a bad words. + The comment #${entity.id} contain a bad words. Comment: - ${entry.content} + ${entity.content} `, }); } - return entry; + return entity; }, }; ```