fix: registerUser request body is invalid (#4002)

I found two issues:
1. This `options` object is being passed down to fetchData,
 where it is deconstructed by the "data" attribute, not body.
2. the `data` object is being transformed into JSON downstream,
 thus the stringification done here makes for a string json object only

Signed-off-by: auyer <rafael@rcpassos.me>
This commit is contained in:
Rafael Passos 2024-11-09 19:18:05 -03:00 committed by GitHub
parent 9989653d00
commit 17d433749c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,7 +34,7 @@ class ChatService {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ displayName: username }),
data: { displayName: username },
};
const response = await getUnauthedData(URL_CHAT_REGISTRATION, options);