Commit e4842b2e by jaymehta

.

1 parent e4e832c8
...@@ -27,12 +27,6 @@ ...@@ -27,12 +27,6 @@
"phoneNumber": { "phoneNumber": {
"type": "string" "type": "string"
}, },
"minGroupSize": {
"type": "string"
},
"maxGroupSize": {
"type": "string"
},
"subCategory": { "subCategory": {
"type": "relation", "type": "relation",
"relation": "oneToOne", "relation": "oneToOne",
...@@ -154,6 +148,12 @@ ...@@ -154,6 +148,12 @@
"rejectionReason": { "rejectionReason": {
"type": "string", "type": "string",
"default": "Yet to approve" "default": "Yet to approve"
},
"maxGroupSize": {
"type": "integer"
},
"minGroupSize": {
"type": "integer"
} }
} }
} }
...@@ -47,6 +47,16 @@ module.exports = createCoreController("api::experience.experience", () => ({ ...@@ -47,6 +47,16 @@ module.exports = createCoreController("api::experience.experience", () => ({
}, },
}); });
const category = await strapi
.query("api::categorie.categorie")
.findOne({
where: {
name: {
$eq: ctx.request.body.data.category,
},
},
});
const repeatedActivities = await strapi const repeatedActivities = await strapi
.query("api::experience.experience") .query("api::experience.experience")
.findOne({ .findOne({
...@@ -86,6 +96,7 @@ module.exports = createCoreController("api::experience.experience", () => ({ ...@@ -86,6 +96,7 @@ module.exports = createCoreController("api::experience.experience", () => ({
cancellationPolicy: ctx.request.body.data.cancellationPolicy, cancellationPolicy: ctx.request.body.data.cancellationPolicy,
vendor: ctx.request.body.data.vendor.id, vendor: ctx.request.body.data.vendor.id,
subCategory: subCategory.id, subCategory: subCategory.id,
category: category.id,
// masterMonths: monthsIds, // masterMonths: monthsIds,
giftSomeone: ctx.request.body.data.giftSomeone, giftSomeone: ctx.request.body.data.giftSomeone,
fromDate: ctx.request.body.data.fromDate, fromDate: ctx.request.body.data.fromDate,
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!