From 5274eaaa4de9d72d4480055b09d1f3e6461438f2 Mon Sep 17 00:00:00 2001 From: nune <145225213+gigirassy@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:53:26 -0500 Subject: [PATCH] Update client.js --- public/client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/client.js b/public/client.js index 604c97b..d834210 100644 --- a/public/client.js +++ b/public/client.js @@ -10,8 +10,8 @@ document.getElementById('fetchBtn').addEventListener('click', async () => { throw new Error(errorData.error || 'Unknown error occurred'); } - const data = await response.json(); - output.textContent = data.text; + const text = await response.text(); // Always plain text + output.textContent = text; // Display raw text } catch (error) { output.textContent = `Error: ${error.message}`; }