diff options
author | mat <github@matdoes.dev> | 2021-06-02 19:43:24 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2021-06-02 19:43:24 -0500 |
commit | 8305c40ecfff509354a966967bfdafa368cc61a9 (patch) | |
tree | 64596f0088f8aaeba25e8d3b0bab7d72e43ecd41 /build | |
parent | 1674472ba12d0c3afea462153c7d723beb0ec6ca (diff) | |
download | skyblock-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.js | 5 |
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); |