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 0dd834f3
authored
2024-07-10 18:27:14 +0530
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
.
1 parent
411442da
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
src/api/experience/controllers/experience.js
src/api/experience/routes/custom-routes.js
src/api/experience/controllers/experience.js
View file @
0dd834f
...
...
@@ -270,6 +270,19 @@ module.exports = createCoreController("api::experience.experience", () => ({
});
},
async
updateMostBooked
(
ctx
)
{
const
{
id
}
=
ctx
.
params
;
const
updatedExperience
=
await
strapi
.
query
(
"api::experience.experience"
)
.
update
({
where
:
{
id
},
data
:
{
mostBooked
:
ctx
.
request
.
body
.
mostBooked
,
},
});
console
.
log
(
"updatedExperience"
,
updatedExperience
);
},
async
updateImage
(
ctx
)
{
console
.
log
(
ctx
.
request
.
body
);
...
...
src/api/experience/routes/custom-routes.js
View file @
0dd834f
...
...
@@ -15,6 +15,14 @@ const routes = {
config
:
{
//some Configuration
},
},
{
method
:
"POST"
,
path
:
"/experience/update-most-booked"
,
handler
:
"api::experience.experience.updateMostBooked"
,
config
:
{
//some Configuration
},
}
],
};
...
...
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