aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-03-27 21:48:59 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-03-27 21:48:59 +0800
commit58c6efd5ee94d8daf3a2bd19426de466d454b690 (patch)
treedc8158e37c9cdbdb54d5f80f70d3cdde8fb3c734
parentaa2a8cc4dff60c19e17383daf76370a8b6aa4c79 (diff)
downloadSoopyV2-58c6efd5ee94d8daf3a2bd19426de466d454b690.tar.gz
SoopyV2-58c6efd5ee94d8daf3a2bd19426de466d454b690.tar.bz2
SoopyV2-58c6efd5ee94d8daf3a2bd19426de466d454b690.zip
fix networth gui loading data + fix bug with syncronus api loading
-rw-r--r--features/networthGUI/index.js2
-rw-r--r--utils/networkUtils.js8
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())
})
}