Commit 06ca6cdd by jaymehta

.

1 parent aae576b1
......@@ -142,46 +142,43 @@ module.exports = createCoreController("api::experience.experience", () => ({
"ctx.request.body.data.activityId",
ctx.request.body.data.activityId
);
const data = {
data: {
name: ctx.request.body.data.name,
description: ctx.request.body.data.description,
pricePerPerson: ctx.request.body.data.pricePerPerson,
address: ctx.request.body.data.address,
masterPincode: ctx.request.body.data.pincode.id,
minimumDuration: ctx.request.body.data.minimumDuration,
maximumDuration: ctx.request.body.data.maximumDuration,
duration: ctx.request.body.data.duration,
ageLowerLimit: ctx.request.body.data.ageLowerLimit,
ageNotes: ctx.request.body.data.ageNotes,
phoneNumber: ctx.request.body.data.phoneNumber,
minGroupSize: ctx.request.body.data.minGroupSize,
maxGroupSize: ctx.request.body.data.maxGroupSize,
activityType: ctx.request.body.data.activityType,
link: ctx.request.body.data.link,
cancellationPolicy: ctx.request.body.data.cancellationPolicy,
// vendor: ctx.request.body.data.vendor.id,
subCategory: subCategory.id,
category: category.id,
giftSomeone: ctx.request.body.data.giftSomeone,
fromDate: ctx.request.body.data.fromDate,
toDate: ctx.request.body.data.toDate,
fromTime: ctx.request.body.data.fromTime,
toTime: ctx.request.body.data.toTime,
offers: ctx.request.body.data.offers,
rating: ctx.request.body.data.rating,
contactPersonForActivity:
ctx.request.body.data.contactPersonForActivity,
contactPersonForBooking: ctx.request.body.data.contactPersonForBooking,
...ctx.request.body.data.daysBoolean,
},
};
const updatedExperience = await strapi
.query("api::experience.experience")
.update(
{ id },
{
data: {
name: ctx.request.body.data.name,
description: ctx.request.body.data.description,
pricePerPerson: ctx.request.body.data.pricePerPerson,
address: ctx.request.body.data.address,
masterPincode: ctx.request.body.data.pincode.id,
minimumDuration: ctx.request.body.data.minimumDuration,
maximumDuration: ctx.request.body.data.maximumDuration,
duration: ctx.request.body.data.duration,
ageLowerLimit: ctx.request.body.data.ageLowerLimit,
ageNotes: ctx.request.body.data.ageNotes,
phoneNumber: ctx.request.body.data.phoneNumber,
minGroupSize: ctx.request.body.data.minGroupSize,
maxGroupSize: ctx.request.body.data.maxGroupSize,
activityType: ctx.request.body.data.activityType,
link: ctx.request.body.data.link,
cancellationPolicy: ctx.request.body.data.cancellationPolicy,
// vendor: ctx.request.body.data.vendor.id,
subCategory: subCategory.id,
category: category.id,
giftSomeone: ctx.request.body.data.giftSomeone,
fromDate: ctx.request.body.data.fromDate,
toDate: ctx.request.body.data.toDate,
fromTime: ctx.request.body.data.fromTime,
toTime: ctx.request.body.data.toTime,
offers: ctx.request.body.data.offers,
rating: ctx.request.body.data.rating,
contactPersonForActivity:
ctx.request.body.data.contactPersonForActivity,
contactPersonForBooking:
ctx.request.body.data.contactPersonForBooking,
...ctx.request.body.data.daysBoolean,
},
}
);
.update({ id }, data);
// const activity = await strapi.entityService.update(
// "api::experience.experience",
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!