From 550fa0fbe4496e19911df9bc8cd6e855b5ae7323 Mon Sep 17 00:00:00 2001 From: leca Date: Thu, 6 Feb 2025 13:07:42 +0000 Subject: [PATCH] no brain head empty --- public/js/chat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/chat.js b/public/js/chat.js index 09810f2..71d128d 100644 --- a/public/js/chat.js +++ b/public/js/chat.js @@ -59,7 +59,7 @@ $(document).ready(async () => { const sendData = async () => { const jwt = getCookie("jwt"); - const author = await fetch(`/api/getUsername`) + const author = await (await fetch(`/api/getUsername`)).text() const content = $("#chat-input").val(); const message = { @@ -83,4 +83,4 @@ $(document).ready(async () => { }); $("#chat-input").bind("enterKey", sendData); -}); \ No newline at end of file +});