Commit 4226ff54 by jaymehta

.

1 parent 4696becb
...@@ -57,11 +57,7 @@ module.exports = createCoreController("api::experience.experience", () => ({ ...@@ -57,11 +57,7 @@ module.exports = createCoreController("api::experience.experience", () => ({
); );
} }
let finalImageArray = []; let finalImageArray = [];
console.log(
"ctx.request.body.data.imagesComponent",
ctx.request.body.data.imagesComponent,
ctx.request.body.data.imagesComponent.length
);
for ( for (
let index = 0; let index = 0;
index < ctx.request.body.data.imagesComponent.length; index < ctx.request.body.data.imagesComponent.length;
...@@ -165,6 +161,11 @@ module.exports = createCoreController("api::experience.experience", () => ({ ...@@ -165,6 +161,11 @@ module.exports = createCoreController("api::experience.experience", () => ({
throw new ValidationError("Category is a mandatory field"); throw new ValidationError("Category is a mandatory field");
} }
console.log("subcategoyr", ctx.params); console.log("subcategoyr", ctx.params);
console.log(
"ctx.request.body.data.imagesComponent",
ctx.request.body.data.imagesComponent,
ctx.request.body.data.imagesComponent.length
);
let finalImageArray = []; let finalImageArray = [];
for ( for (
let index = 0; let index = 0;
...@@ -172,7 +173,9 @@ module.exports = createCoreController("api::experience.experience", () => ({ ...@@ -172,7 +173,9 @@ module.exports = createCoreController("api::experience.experience", () => ({
index++ index++
) { ) {
const element = ctx.request.body.data.imagesComponent[index]; const element = ctx.request.body.data.imagesComponent[index];
console.log("element", element)
finalImageArray = [...finalImageArray, { image: element }]; finalImageArray = [...finalImageArray, { image: element }];
console.log("final", finalImageArray)
} }
const subCategory = await strapi const subCategory = await strapi
.query("api::sub-categorie.sub-categorie") .query("api::sub-categorie.sub-categorie")
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!