From 989ffe5a80899bdc7b65be5abd83bc8d7d5901e2 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Sun, 22 Aug 2021 13:21:30 +0400 Subject: [PATCH] debug --- website/src/lib/backend-calls.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/src/lib/backend-calls.ts b/website/src/lib/backend-calls.ts index 5b91772..3b51a7a 100644 --- a/website/src/lib/backend-calls.ts +++ b/website/src/lib/backend-calls.ts @@ -16,7 +16,9 @@ async function accountApiFetch(url: string, method: "GET" | "POST" | "PUT" | "DE body: JSON.stringify(body), } : {}, }); - return await response.json() as AT.APIResponse; + const raw = await response.text(); + console.log("api response:", raw); + return JSON.parse(raw) as AT.APIResponse; } export async function publishDictionary(): Promise {