ASyncify
This commit is contained in:
parent
ad2fbd0c67
commit
f1697695f2
|
@ -41,8 +41,11 @@
|
||||||
body: JSON.stringify(data)
|
body: JSON.stringify(data)
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
async function doStuff() {
|
||||||
let code = await response.text()
|
let code = await response.text()
|
||||||
window.location.replace(redirect_uri + "?code=" + code + "&state=" + state)
|
window.location.replace(redirect_uri + "?code=" + code + "&state=" + state)
|
||||||
|
}
|
||||||
|
doStuff()
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
alert("Error sending data: " + error.message);
|
alert("Error sending data: " + error.message);
|
||||||
|
|
Reference in New Issue