Receives: user JSON object containing login information (see #15 for detail on data)
Function: Each time a user is logs in, the JSON object generated by Auth0 is posted to this route.
Returns: same JSON object posted. If the user already exists (it's not their first time logging in), a user_metadata field will be appended to the object which contains user information configurable by CLT
GET/user/:id:
Receives: No data is sent, only the id of the user as an additional url path after /user
Function: Returns all user data from the backend database. Same format as /login with a user_metadata field appended
Returns: A JSON object with the same format as what was posted in the /login route.
PATCH/user/:id:
Receives: A user_metadata object to patch into the user database entry
Function: Modifies the data of a user with the sent data. Used when the frontend wishes to modify a user field
POST
/login
:user_metadata
field will be appended to the object which contains user information configurable by CLTGET
/user/:id
:/user
/login
with auser_metadata
field appended/login
route.PATCH
/user/:id
:user_metadata
object to patch into the user database entry