Commit 73d9acdc by jaymehta

.

1 parent 8a0e1722
...@@ -208,11 +208,17 @@ module.exports = createCoreController("api::experience.experience", () => ({ ...@@ -208,11 +208,17 @@ module.exports = createCoreController("api::experience.experience", () => ({
...ctx.request.body.data.daysBoolean, ...ctx.request.body.data.daysBoolean,
}, },
}); });
const imagesComponentData = Array.isArray(
ctx.request.body.data.imagesArrayComponent
)
? ctx.request.body.data.imagesArrayComponent
: [ctx.request.body.data.imagesArrayComponent];
const updatedExperienceImageComponent = await strapi.entityService.update( const updatedExperienceImageComponent = await strapi.entityService.update(
"api::experience.experience", "api::experience.experience",
id, id,
{ {
data: { imagesComponent: ctx.request.body.data.imagesArrayComponent }, data: { imagesComponent: imagesComponentData },
} }
); );
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!