From d36a289e7e5c22e589bab68945099862816054b3 Mon Sep 17 00:00:00 2001 From: Andrea Date: Thu, 6 Nov 2025 08:33:08 +0100 Subject: [PATCH] Test function fixed (now showing raw JSON body result in alert) --- script.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/script.js b/script.js index e1b9d87..11600e2 100644 --- a/script.js +++ b/script.js @@ -8,9 +8,7 @@ function orkodyo(){ }; fetch(apiUrl + "/api/pizze", requestOptions) - .then((response) => reply = response.text()) - .then((result) => console.log(result)) + .then((response) => response.text()) + .then((result) => alert(result)) .catch((error) => console.error(error)); - - alert(reply); }