Closed nick-y-ito closed 5 months ago
@nick-y-ito @ShoeheyOt
Same issue in "Get a User ID" (auth/me
) API.
It returns a string, so I will also resolve the problem with JSON.parse()
for now.
API Reference : https://nishiki-tech.github.io/nishiki-documents/web-api/index.html#tag/auth/paths/~1auth~1me/get
Same issue in "Get a User" (users/{userId}
) API.
It returns a string, so in here also, I will use JSON.parse()
for now.
In addition to that, there's another problem with this API. It's supposed to return
{
"id": "679adc58-b03a-4fb6-993b-c72404087375",
"name": "John"
}
but instead, its response has totally different shape from the document.
{
"status":"OK",
"statusCode":200,
"body": "userId": "679adc58-b03a-4fb6-993b-c72404087375",
"username": "John"
}}
So not only JSON.parse()
, I'm extracting the body
from the original response for now.
API reference : https://nishiki-tech.github.io/nishiki-documents/web-api/index.html#tag/user/paths/~1users~1%7BuserId%7D/get
Description
In the following code, the
data
variable is being treated as a string type, although an object was expected. This issue may be attributed to the backend. Once the API issue is resolved, the corresponding frontend code should be updated accordingly.src/lib/api/group/client/groupApiClient.client.ts
Refereces
Notes
-