Create new note in listing now working

This commit is contained in:
dhain 2022-10-11 08:52:11 +02:00
parent 93f9979259
commit 031a4e5259
3 changed files with 23 additions and 45 deletions

View file

@ -87,7 +87,8 @@ module.exports = createCoreController(noteUid, ({strapi}) => ({
*/
async create(ctx) {
const userId = ctx.state.user.id;
const requestBody = ctx.request.body;
const requestBody = JSON.parse(ctx.request.body);
console.log(requestBody);
const response = await strapi.entityService.create(noteUid, {
data: {
title: requestBody.data.title,