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 e4842b2e
authored
2024-05-04 13:33:04 +0530
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
.
1 parent
e4e832c8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
src/api/experience/content-types/experience/schema.json
src/api/experience/controllers/experience.js
src/api/experience/content-types/experience/schema.json
View file @
e4842b2
...
...
@@ -27,12 +27,6 @@
"phoneNumber"
:
{
"type"
:
"string"
},
"minGroupSize"
:
{
"type"
:
"string"
},
"maxGroupSize"
:
{
"type"
:
"string"
},
"subCategory"
:
{
"type"
:
"relation"
,
"relation"
:
"oneToOne"
,
...
...
@@ -154,6 +148,12 @@
"rejectionReason"
:
{
"type"
:
"string"
,
"default"
:
"Yet to approve"
},
"maxGroupSize"
:
{
"type"
:
"integer"
},
"minGroupSize"
:
{
"type"
:
"integer"
}
}
}
src/api/experience/controllers/experience.js
View file @
e4842b2
...
...
@@ -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
.
query
(
"api::experience.experience"
)
.
findOne
({
...
...
@@ -86,6 +96,7 @@ module.exports = createCoreController("api::experience.experience", () => ({
cancellationPolicy
:
ctx
.
request
.
body
.
data
.
cancellationPolicy
,
vendor
:
ctx
.
request
.
body
.
data
.
vendor
.
id
,
subCategory
:
subCategory
.
id
,
category
:
category
.
id
,
// masterMonths: monthsIds,
giftSomeone
:
ctx
.
request
.
body
.
data
.
giftSomeone
,
fromDate
:
ctx
.
request
.
body
.
data
.
fromDate
,
...
...
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