mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2025-01-08 19:38:36 +01:00
try returning dummy profile when demo
This commit is contained in:
parent
4c94a7047c
commit
0579027ff1
@ -117,7 +117,7 @@ function refreshAccountList() {
|
||||
getMcAccounts().filter(isMojang).forEach(it => addMcAccountToList(it.id, it.name));
|
||||
(myMSALObj.getAllAccounts() || []).forEach(msAccount => {
|
||||
let mcAcc = getMcAccounts().filter(isNotMojang).filter(it => it.msUser == msAccount.username)[0] || {};
|
||||
addMcAccountToList(mcAcc.id || "d3c47f6f-ae3a-45c1-ad7c-e2c762b03ae6", mcAcc.name || "[DEMO]", msAccount.username);
|
||||
addMcAccountToList(mcAcc.id || "MHF_Question", mcAcc.name || "...", msAccount.username);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ function refreshTokenMs(username) {
|
||||
}).then(json => {
|
||||
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 (profile.status == 404) return {id: "MHF_Exclamation", name: "[DEMO]"};
|
||||
if (!isSuccess(profile.status)) throw "profile response not success";
|
||||
return profile.json();
|
||||
}).then(jsonProfile => {
|
||||
|
Loading…
Reference in New Issue
Block a user