-
Notifications
You must be signed in to change notification settings - Fork 80
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
Feat: Issue#82 POST and GET /user/personal_background api endpoints #83
Feat: Issue#82 POST and GET /user/personal_background api endpoints #83
Conversation
Update @ramitsawhney27 and @anitab-org/bridgeintech-maintainers . Here's PR for POST and GET /user/personal_background api endpoints. The test cases will be submitted separately. Look forward to hear your feedback. |
2a8bc3f
to
02a6ad3
Compare
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.
This PR (+the tests) look coherent. Good work!
Thanks, @ramitsawhney27 |
3099657
to
5235660
Compare
Update @anitab-org/bridgeintech-maintainers . I've modified background enum logic as per our discussion on BIT weekly meeting. Please re-rerview. Thanks |
5235660
to
62139e4
Compare
Update @anitab-org/bridgeintech-maintainers . I've just force pushed changes to add other fields for physical and mental ability as well as socio-economic status. |
62139e4
to
a700663
Compare
Update @anitab-org/bridgeintech-maintainers . I've solved merge conflict, fix bug as mentioned on zulip post, and temporarily fix bug as reported on issue #94 (similar approach also applied on PR #80). |
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.
PR81 for issue80 was reviewed and tested. @mtreacy002
review the following conflicting files when you have time 👍
a700663
to
67f8908
Compare
@ramitsawhney27 and @foongminwong, I've resolved the merged conflicts. I think you both need to re-approve it again as your previous approvals were removed by the force pushed. |
@mtreacy002 {
"gender": "MALE",
"age": "DECLINED",
"ethnicity": "DECLINED",
"sexual_orientation": "DECLINED",
"religion": "DECLINED",
"physical_ability": "DECLINED",
"mental_ability": "DECLINED",
"socio_economic": "DECLINED",
"highest_education": "DECLINED",
"years_of_experience": "DECLINED",
"gender_other": "DECLINED",
"ethnicity_other": "NOT_APPLICABLE",
"sexual_orientation_other": "DECLINED",
"religion_other": "DECLINED",
"physical_ability_other": "DECLINED",
"mental_ability_other": "DECLINED",
"socio_economic_other": "DECLINED",
"highest_education_other": "DECLINED",
"is_public": true
} I got the following response: Do you know which |
@foongminwong . As per our last week discussion on the enum logic all pushed to backend, the input fields now only take background VALUE instead of their |
Refactor Background enum logic Add other fields for physical, mental and socio-economic Fix: bug on user_id not retrieved error message and setting cookie Add info on enum value as input on POST /user/personal_background api endpoint
67f8908
to
9992710
Compare
Update @anitab-org/bridgeintech-maintainers . I've just force pushed with the change on POST /user/personal_background doc string that Background enum input needs the enum VALUE. @ramitsawhney27 and @foongminwong , can you please re-approve? Thanks |
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.
The changes made in this PR were tested locally. Following are the results:
-
Code review - Done
-
All possible responses were tested as below:
{
"gender": "Prefer not to say",
"age": "Prefer not to say",
"ethnicity": "Prefer not to say",
"sexual_orientation": "Prefer not to say",
"religion": "Prefer not to say",
"physical_ability": "Prefer not to say",
"mental_ability": "Prefer not to say",
"socio_economic": "Prefer not to say",
"highest_education": "Prefer not to say",
"years_of_experience": "Prefer not to say",
"gender_other": "Prefer not to say",
"ethnicity_other": "Prefer not to say",
"sexual_orientation_other": "Prefer not to say",
"religion_other": "Not Applicable",
"physical_ability_other": "Not Applicable",
"mental_ability_other": "Not Applicable",
"socio_economic_other": "Not Applicable",
"highest_education_other": "Not Applicable",
"is_public": true
}
-
GET /user/personal_background
Screenshot/gif/url:Description: Above gif output shows a person who does not have any personal background.
Expected Result: As a user, I should be able to retrieve my personal background.
Actual Result: Same as expected
- OS Version: Windows 10
Description
Give user the ability to create and get their personal background information.
Fixes #82
Type of Change:
Code/Quality Assurance Only
How Has This Been Tested?
on successful output - personal background information successfully created:
when user already has existing personal background information in the database:
on successful output:
on error response - user has no personal background information in the database:
Checklist:
Code/Quality Assurance Only
Additional note
app/utils/bitschema_utils.py
file.