How to fill Content-Type data within POST Request

article, in this case, contains the RESULT object of the creation.

The correct code:

 async create(ctx) {
     let entity = await strapi.services.article.create({
         ...ctx.request.body,
         title:'Hello World'
     });
     return sanitizeEntity(entity, {
         model: strapi.models.article
     });
 }
2 Likes