-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added onlyForFemale field #76
Changes from 9 commits
7f343dc
715989b
a905927
7418058
d50437c
a9a2a45
1f8a9e3
a14535b
4e33ff8
b61375b
a3b34ca
0d7bae5
75efa4a
f9a13da
6b41c38
d204fcf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,17 @@ class opportunityManager { | |
queryObject['opportunityType'] = queryObject.type; | ||
delete queryObject.type; | ||
} | ||
if (queryObject.female) { | ||
queryObject['onlyForFemale'] = queryObject.female == 'true'; | ||
delete queryObject.female; | ||
} | ||
console.log('Values in QueryString', queryObject); | ||
|
||
let fetchedOpportunitiesQuery = this.opportunity.find(queryObject); | ||
// fetchedOpportunitiesQuery.select('-__v'); | ||
// fetchedOpportunitiesQuery.select('-_id'); | ||
console.log(fetchedOpportunitiesQuery.data); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
return fetchedOpportunitiesQuery; | ||
|
||
//console.log('Values of QueryString', queryObject); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,19 +133,12 @@ const opportunityManager = new OpportunityManager(), | |
* - SCHOLARSHIP | ||
* - CONFERENCE | ||
* - CODINGCOMPETITION | ||
* description: Retrieve a list of opportunities based on particular type. | ||
* description: Retrieve a list of opportunities based on particular type or only for female. | ||
* parameters: | ||
* - in: query | ||
* name: page | ||
* name: female | ||
* schema: | ||
* type: Integer | ||
* default: 1 | ||
* description: The Current Page for which the data User Wants | ||
* - in: query | ||
* name: limit | ||
* schema: | ||
* type: Integer | ||
* default: 10 | ||
* description: The count of items/documents that should be returned on each page | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
* type: boolean | ||
* responses: | ||
* 200: | ||
* description: A list of opportunities. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should not this be a boolean value? and please use
===
instead of==
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!