Updates a user with the corresponding ID.
URL : /users/self
Method : PUT
Header :
"Content-Type": "application/json"
"Authorization": "Bearer [valid token]"
Body :
{
"email": "[new email]",
"password": "[new password]",
"type": "[new type]"
}
Code : 200 OK
Condition : If user does not exist.
Code : 404 Not Found
Body :
{
"code": "ResourceNotFound",
"message": "There is no user with the id [id]"
}
}
Condition : Trying to change verified
field.
Code : 401 Unauthorized
Body :
{
"code": "Unauthorized",
"message": "Cannot modify verified field."
}
}