Update client.js

This commit is contained in:
nune 2024-12-18 16:53:26 -05:00 committed by GitHub
parent 0de22267d6
commit 5274eaaa4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,8 +10,8 @@ document.getElementById('fetchBtn').addEventListener('click', async () => {
throw new Error(errorData.error || 'Unknown error occurred'); throw new Error(errorData.error || 'Unknown error occurred');
} }
const data = await response.json(); const text = await response.text(); // Always plain text
output.textContent = data.text; output.textContent = text; // Display raw text
} catch (error) { } catch (error) {
output.textContent = `Error: ${error.message}`; output.textContent = `Error: ${error.message}`;
} }