Commit 0dd834f3 by jaymehta

.

1 parent 411442da
...@@ -270,6 +270,19 @@ module.exports = createCoreController("api::experience.experience", () => ({ ...@@ -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) { async updateImage(ctx) {
console.log(ctx.request.body); console.log(ctx.request.body);
......
...@@ -15,6 +15,14 @@ const routes = { ...@@ -15,6 +15,14 @@ const routes = {
config: { config: {
//some Configuration //some Configuration
}, },
},
{
method: "POST",
path: "/experience/update-most-booked",
handler: "api::experience.experience.updateMostBooked",
config: {
//some Configuration
},
} }
], ],
}; };
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!