Closed mbalabanov closed 1 year ago
Hmmmm - line 1368 is not the issue, and I can't see anything obvious - could you give me the URL to which you're patching and some example data, please - that way I can have a closer look...
Duplicate of #36
...ah - I can see some data in #36 - thanks - I'll use that and get back to you...
Thank you. The githubUrl now gets updated successfully. (The issue with the cohortId being set to null still remains: https://github.com/boolean-uk/team-dev-frontend-client/issues/36 )
Please find the request below (usable for REST Client in VSCode). I will close this issue.
### PATCH - Update existing user
PATCH https://team-dev-frontend-server.herokuapp.com/user/update/1 HTTP/1.1
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsImlhdCI6MTY2NTY1NDI4MCwiZXhwIjoxNjY1NzQwNjgwfQ.0uhUy8-QXjWwz4dNDpaEcywy-8bRGDCKQ6M0g9-xMh4
{
"email": "teacher@teacher.com",
"password": "t3ach3r",
"cohortId": 5,
"role": "TEACHER",
"firstName": "Third Changed first name",
"lastName": "Third Changed last name",
"biography": "The quick brown fox jumps over the lazy dog.",
"githubUrl": "http://github.com/test",
"profileUrl": "https://images.unsplash.com/photo-1614027164847-1b28cfe1df60?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=972&q=80"
}
When patching the user data through the API endpoint for user updates, the key
githubUrl
is not being updated.A possible but unverified cause for this could be a typo in the API source code in the file
openapi.yml
line 1368 wheregithub_url
is used instead ofgithubUrl
like everywhere else in the API source code.