VRMS
VRMS copied to clipboard
Implement a controller for handling UserProfile API endpoints
The task is blocked by:
- [x] #407
- [x] #431
Overview
Implement a controller for handling UserProfile API endpoints.
Action Items
- [ ] Add
userProfile.controller.jsintobackend/controllersfolder. - [ ] Implement POST
/userProfilesAPI endpoint that returns the createduserProfilevalue in the response. CallcreateUserfunction ofuserProfile.service.js. - [ ] Implement PATCH
/userProfilesAPI endpoint that returns the updateduserProfilevalue in the response. Don't use parameters. The request body should contain an email. CallupdateUserfunction ofuserProfile.service.js. - [ ] Implement GET
/userProfiles/{id}API endpoint that returnsuserProfilevalue in the response. CallgetUserfunction of userProfile.service.js. - [ ] For all endpoints wrap the call to service function into
try/catch. In case of an error get the error message and return it with relevant HTTP code (400 for validation error, 503 for database error). To avoid code duplication implement a reusable function for handling errors. - [ ] Cover implemented functionality with tests.
Resources
The project convention about responses' HTTP codes #357
Hi @glenflorendo,
If you can, it would be great to have you join us for tomorrow's VRMS tech meeting. That will give us a chance to review this ticket to see if it is the best thing for you to work on.
Thanks!
Hi @glenflorendo,
If you can, it would be great to have you join us for tomorrow's VRMS tech meeting. That will give us a chance to review this ticket to see if it is the best thing for you to work on.
Thanks!
Hey @jasonwong26 . I'm so sorry! I just saw your comment right now. I was helping my family with a move, so I haven't been monitoring my emails. But, the move should be done by next Monday. Could we catch up at another time soon after? Otherwise, I'll attend the meeting next Thursday. 😄