Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jay Mehta
/
zango-strapi
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Registry
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 3b09045f
authored
2024-06-01 15:36:07 +0530
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
.
1 parent
4226ff54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
src/api/experience/controllers/experience.js
src/api/experience/controllers/experience.js
View file @
3b09045
...
@@ -57,7 +57,7 @@ module.exports = createCoreController("api::experience.experience", () => ({
...
@@ -57,7 +57,7 @@ module.exports = createCoreController("api::experience.experience", () => ({
);
);
}
}
let
finalImageArray
=
[];
let
finalImageArray
=
[];
for
(
for
(
let
index
=
0
;
let
index
=
0
;
index
<
ctx
.
request
.
body
.
data
.
imagesComponent
.
length
;
index
<
ctx
.
request
.
body
.
data
.
imagesComponent
.
length
;
...
@@ -66,7 +66,7 @@ module.exports = createCoreController("api::experience.experience", () => ({
...
@@ -66,7 +66,7 @@ module.exports = createCoreController("api::experience.experience", () => ({
const
element
=
ctx
.
request
.
body
.
data
.
imagesComponent
[
index
];
const
element
=
ctx
.
request
.
body
.
data
.
imagesComponent
[
index
];
console
.
log
(
"here >"
,
element
);
console
.
log
(
"here >"
,
element
);
finalImageArray
=
[...
finalImageArray
,
{
image
:
element
}];
finalImageArray
=
[...
finalImageArray
,
{
image
:
element
}];
console
.
log
(
"final array"
,
finalImageArray
)
console
.
log
(
"final array"
,
finalImageArray
)
;
}
}
// ctx.request.body.data.imagesComponent;
// ctx.request.body.data.imagesComponent;
...
@@ -106,7 +106,7 @@ module.exports = createCoreController("api::experience.experience", () => ({
...
@@ -106,7 +106,7 @@ module.exports = createCoreController("api::experience.experience", () => ({
contactPersonForBooking
:
contactPersonForBooking
:
ctx
.
request
.
body
.
data
.
contactPersonForBooking
,
ctx
.
request
.
body
.
data
.
contactPersonForBooking
,
approved
:
ctx
.
request
.
body
.
data
.
approved
,
approved
:
ctx
.
request
.
body
.
data
.
approved
,
imagesComponent
:
ctx
.
request
.
body
.
data
.
imagesComponent
,
imagesComponent
:
finalImageArray
,
// imagesComponent: finalImageArray,
// imagesComponent: finalImageArray,
...
ctx
.
request
.
body
.
data
.
daysBoolean
,
...
ctx
.
request
.
body
.
data
.
daysBoolean
,
},
},
...
@@ -173,9 +173,9 @@ module.exports = createCoreController("api::experience.experience", () => ({
...
@@ -173,9 +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
)
console
.
log
(
"element"
,
element
)
;
finalImageArray
=
[...
finalImageArray
,
{
image
:
element
}];
finalImageArray
=
[...
finalImageArray
,
{
image
:
element
}];
console
.
log
(
"final"
,
finalImageArray
)
console
.
log
(
"final"
,
finalImageArray
)
;
}
}
const
subCategory
=
await
strapi
const
subCategory
=
await
strapi
.
query
(
"api::sub-categorie.sub-categorie"
)
.
query
(
"api::sub-categorie.sub-categorie"
)
...
@@ -236,7 +236,7 @@ module.exports = createCoreController("api::experience.experience", () => ({
...
@@ -236,7 +236,7 @@ module.exports = createCoreController("api::experience.experience", () => ({
approved
:
ctx
.
request
.
body
.
data
.
approved
,
approved
:
ctx
.
request
.
body
.
data
.
approved
,
// imagesComponent: ctx.request.body.data.imagesArrayComponent,
// imagesComponent: ctx.request.body.data.imagesArrayComponent,
...
ctx
.
request
.
body
.
data
.
daysBoolean
,
...
ctx
.
request
.
body
.
data
.
daysBoolean
,
imagesComponent
:
finalImageArray
,
imagesComponent
:
ctx
.
request
.
body
.
data
.
imagesComponent
,
},
},
});
});
console
.
log
(
console
.
log
(
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment