From ad2fbd0c6721fc0ec6bb99ca9fa69bc95135b5dc Mon Sep 17 00:00:00 2001 From: arzumify Date: Thu, 28 Mar 2024 18:24:24 +0000 Subject: [PATCH] ASync moment --- templates/main.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/main.html b/templates/main.html index 57591b0..f7bcd4c 100644 --- a/templates/main.html +++ b/templates/main.html @@ -41,7 +41,8 @@ body: JSON.stringify(data) }) .then(response => { - window.location.replace(redirect_uri + "?code=" + response.text() + "&state=" + state) + let code = await response.text() + window.location.replace(redirect_uri + "?code=" + code + "&state=" + state) }) .catch(error => { alert("Error sending data: " + error.message);