Closed KieranVieira closed 3 years ago
Outline:
second POST route:
auth middlware:
Note to KR: Error handling is top priority, must handle all cases. Imagine third party looking at code, they need to know what is expecting at certain points in the code for it to work. In some cases error handling is kept vague to prevent sensitive information from being gathered (logging in messages)
GET route:
GET route:
- use req.params to find user (since already authed by middleware)
- response with json body of user information
You sure about that?
Lets circle back on this in T minus 3 hours
GET route:
- use req.params to find user (since already authed by middleware)
- response with json body of user information
You sure about that?
WHAT DOES THIS MEAN?
PUT req:
Tech:
Instructions:
/api/users
that takes in x body and creates a user/api/users/login
that takes in x body and returns authentication token/api/users/:userId
that returns user information/api/users/:userId
that updates user information