Commit e909a086 by jaymehta

.

1 parent 71423e28
...@@ -208,18 +208,21 @@ module.exports = createCoreController("api::experience.experience", () => ({ ...@@ -208,18 +208,21 @@ module.exports = createCoreController("api::experience.experience", () => ({
...ctx.request.body.data.daysBoolean, ...ctx.request.body.data.daysBoolean,
}, },
}); });
console.log("ctx.request.body.data.imagesArrayComponent", ctx.request.body.data.imagesArrayComponent); console.log(
const imagesComponentData = Array.isArray( "ctx.request.body.data.imagesArrayComponent",
ctx.request.body.data.imagesArrayComponent ctx.request.body.data.imagesComponent
) );
? ctx.request.body.data.imagesArrayComponent // const imagesComponentData = Array.isArray(
: [ctx.request.body.data.imagesArrayComponent]; // ctx.request.body.data.imagesArrayComponent
console.log("imagesComponentData >", imagesComponentData); // )
// ? ctx.request.body.data.imagesArrayComponent
// : [ctx.request.body.data.imagesArrayComponent];
// console.log("imagesComponentData >", imagesComponentData);
const updatedExperienceImageComponent = await strapi.entityService.update( const updatedExperienceImageComponent = await strapi.entityService.update(
"api::experience.experience", "api::experience.experience",
id, id,
{ {
data: { imagesComponent: imagesComponentData }, data: { imagesComponent: ctx.request.body.data.imagesComponent },
} }
); );
console.log("updatedExperience", updatedExperience); console.log("updatedExperience", updatedExperience);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!