From 58c6efd5ee94d8daf3a2bd19426de466d454b690 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sun, 27 Mar 2022 21:48:59 +0800 Subject: fix networth gui loading data + fix bug with syncronus api loading --- features/networthGUI/index.js | 2 +- utils/networkUtils.js | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/features/networthGUI/index.js b/features/networthGUI/index.js index 90033e9..4e4b527 100644 --- a/features/networthGUI/index.js +++ b/features/networthGUI/index.js @@ -130,7 +130,7 @@ class NetworthPage extends GuiPage { return } - fetch("http://soopymc.my.to/api/v2/player_skyblock/" + playerData.data.uuid + "?items").json(skyblockData=>{ + fetch("http://soopymc.my.to/api/v2/player_skyblock/" + playerData.data.uuid).json(skyblockData=>{ if(player !== this.playerLoad) return diff --git a/utils/networkUtils.js b/utils/networkUtils.js index aaad6e2..2f84128 100644 --- a/utils/networkUtils.js +++ b/utils/networkUtils.js @@ -82,7 +82,7 @@ if(!global.networkUtilsThingSoopy){ if(!callback){ ret.sync() - return this.loadedString + return loadedString } ret.async(()=>{ @@ -108,14 +108,12 @@ if(!global.networkUtilsThingSoopy){ }, responseCode: (callback)=>{ if(!callback){ - if(loadedConnection === undefined){ - ret.text() - } + ret.sync() return loadedConnection.getResponseCode() } - ret.text(data=>{ + ret.async(data=>{ callback(loadedConnection.getResponseCode()) }) } -- cgit