mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2024-11-04 09:30:00 +01:00
fixed promise chaining
This commit is contained in:
parent
af09a6a3ac
commit
4c94a7047c
@ -59,7 +59,7 @@ function refreshTokenMs(username) {
|
||||
if (!isSuccess(mcResponse.status)) throw "mc response not success";
|
||||
return mcResponse.json();
|
||||
}).then(json => {
|
||||
fetch(getCorsProxy() + "https://api.minecraftservices.com/minecraft/profile", {
|
||||
return fetch(getCorsProxy() + "https://api.minecraftservices.com/minecraft/profile", {
|
||||
method: "get", headers: {"content-type": "application/json", "authorization": "Bearer " + json.access_token}}).then(profile => {
|
||||
if (profile.status == 404) throw "no profile";
|
||||
if (!isSuccess(profile.status)) throw "profile response not success";
|
||||
|
Loading…
Reference in New Issue
Block a user