aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-06-02 19:43:24 -0500
committermat <github@matdoes.dev>2021-06-02 19:43:24 -0500
commit8305c40ecfff509354a966967bfdafa368cc61a9 (patch)
tree64596f0088f8aaeba25e8d3b0bab7d72e43ecd41 /build
parent1674472ba12d0c3afea462153c7d723beb0ec6ca (diff)
downloadskyblock-api-8305c40ecfff509354a966967bfdafa368cc61a9.tar.gz
skyblock-api-8305c40ecfff509354a966967bfdafa368cc61a9.tar.bz2
skyblock-api-8305c40ecfff509354a966967bfdafa368cc61a9.zip
more debugging:tm:
Diffstat (limited to 'build')
-rw-r--r--build/mojang.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/build/mojang.js b/build/mojang.js
index ef4f7fd..6180b15 100644
--- a/build/mojang.js
+++ b/build/mojang.js
@@ -55,11 +55,12 @@ async function profileFromUsername(username) {
return await profileFromUsername(username);
}
let data;
+ const rawData = await fetchResponse.text();
try {
- data = await fetchResponse.json();
+ data = JSON.parse(rawData);
}
catch { }
- console.log('mojang returned', data);
+ console.log('mojang returned', rawData);
if (!(data === null || data === void 0 ? void 0 : data.id)) {
console.log('mojang api failed, trying ashcon as backup');
return await profileFromUsernameAlternative(username);