-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/shreyagupta112/user routes #45
Feature/shreyagupta112/user routes #45
Conversation
User Schema and get route for admin and non-admin users
Get route which retrieves a list of all admin users or a list of all non-admin users.
Modified the get route for admin/ non-admin users to check if req.params.admin is a valid input
…sportJS-and-made-admin-get-route' of https://github.com/TritonSE/MAW-Volunteer-Hub into feature/shreyagupta112/created-user-model-integrted-PassportJS-and-made-admin-get-route
…odel-integrted-PassportJS-and-made-admin-get-route
…gupta112/created-user-model-integrted-PassportJS-and-made-admin-get-route
…gupta112/created-user-model-integrted-PassportJS-and-made-admin-get-route
…sportJS-and-made-admin-get-route' of https://github.com/TritonSE/MAW-Volunteer-Hub into feature/shreyagupta112/User-Routes
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.
Just to sanitize a bit, we can remove the "/secure" route in UserRoutes otherwise everything else, LGTM
Nmv, was a small change, made it myself
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.
LGTM
…gupta112/User-Routes
So as of now I have found the following errors: |
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.
Tested All possible edge cases, work right about fine!
LGTM
Administrative Info
#38
Make sure your branch name conforms to:
<feature/staging/hotfix/...>/[username]/[3-4 word description separated by dashes]
. Otherwise, please rename your branch and create a new PR.Changes
I created the auth_header.js file and modified the UserRoutes.js file to include new user routes. I created the auth_header.js file to used by a few user routes. I created routes to upgrade users to admin and verified by id, a route to get a user's profile by id, and a route to update user information. The route to upgrade a user to admin requires the logged-in user to be an admin and the route to update user information requires either the logged-in user to be an admin or to be the same user as the one who's information is being edited.
Testing
How did you confirm your changes worked?
I used Postman to run each of the user routes.
Confirmation of Change
I created the auth_header.js file. Everything that isn't the secure and admin routes has been changed.