From 1301c145e81af9b68c9781e01458f71e037c16a1 Mon Sep 17 00:00:00 2001 From: Nikolai Petukhov Date: Thu, 3 Oct 2024 23:20:40 +0300 Subject: [PATCH] check json format --- src/backend/api.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/api.js b/src/backend/api.js index 51fc3f3..09ec5e7 100644 --- a/src/backend/api.js +++ b/src/backend/api.js @@ -23,7 +23,10 @@ export async function post(path, body) { console.log("Initial data from API:", res) - const data = JSON.parse(await res.text()); + const txt = await res.text(); + console.log("Initial text from API:", txt) + + const data = JSON.parse(txt); console.log("Data from API:", data)