From f1697695f22d140c0c71a2220b5d3cff2f56b795 Mon Sep 17 00:00:00 2001 From: Tracker-Friendly Date: Thu, 28 Mar 2024 18:32:48 +0000 Subject: [PATCH] ASyncify --- templates/main.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/main.html b/templates/main.html index f7bcd4c..e8441f1 100644 --- a/templates/main.html +++ b/templates/main.html @@ -41,8 +41,11 @@ body: JSON.stringify(data) }) .then(response => { - let code = await response.text() - window.location.replace(redirect_uri + "?code=" + code + "&state=" + state) + async function doStuff() { + let code = await response.text() + window.location.replace(redirect_uri + "?code=" + code + "&state=" + state) + } + doStuff() }) .catch(error => { alert("Error sending data: " + error.message);