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:
@@ -34,7 +34,7 @@ class ChatService {
|
|||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
body: JSON.stringify({ displayName: username }),
|
data: { displayName: username },
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = await getUnauthedData(URL_CHAT_REGISTRATION, options);
|
const response = await getUnauthedData(URL_CHAT_REGISTRATION, options);
|
||||||
|
|||||||
Reference in New Issue
Block a user