From 17d433749c71900283b05e31c36ee683ee1baf1e Mon Sep 17 00:00:00 2001 From: Rafael Passos Date: Sat, 9 Nov 2024 19:18:05 -0300 Subject: [PATCH] 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 --- web/services/chat-service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/services/chat-service.ts b/web/services/chat-service.ts index 54551026f..3fb59fe53 100644 --- a/web/services/chat-service.ts +++ b/web/services/chat-service.ts @@ -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);