|
@@ -42,10 +42,10 @@ There are a couple of things that I would do differently if I could change the A
|
|
|
|
|
|
|
|
1. Change CORS policy to allow fetch by any origin (only because this is a public API)
|
|
1. Change CORS policy to allow fetch by any origin (only because this is a public API)
|
|
|
2. Improve responses:
|
|
2. Improve responses:
|
|
|
- a. Server should return client error responses (40X) if the data was invalid, not 500 (Server error response).
|
|
|
|
|
- b. It would be nice if `/login` endpoint returns user data instead of just a message
|
|
|
|
|
- c. Double check message content (there was a tiny typo in the failed response for `/login`)
|
|
|
|
|
- d. I would change the result of `/user/{id}` to return a user with an `id: int` instead of `id: string` to keep consistency with the other endpoints.
|
|
|
|
|
|
|
+ - Server should return client error responses (40X) if the data was invalid, not 500 (Server error response).
|
|
|
|
|
+ - It would be nice if `/login` endpoint returns user data instead of just a message
|
|
|
|
|
+ - Double check message content (there was a tiny typo in the failed response for `/login`)
|
|
|
|
|
+ - I would change the result of `/user/{id}` to return a user with an `id: int` instead of `id: string` to keep consistency with the other endpoints.
|
|
|
|
|
|
|
|
## Improvements
|
|
## Improvements
|
|
|
|
|
|