Completely fix api calls

Fix web browser api call
This commit is contained in:
Brandon Plank 2021-12-06 17:27:56 -05:00
parent a7d1ce0069
commit 56defb0e5b
4 changed files with 11 additions and 18 deletions

View file

@ -107,19 +107,6 @@ const CiderBase = {
}
})
}
win.webContents.on('did-finish-load', () => {
let authFile = require("../auth.json")
request({url: "https://devkey.cider.sh/",
headers: {
"Authorization": "Bearer "+authFile.authHeader
}
}, function (error, response, body) {
if (error) return console.log(error);
let parsedJson = JSON.parse(body)
win.webContents.send("devkey", parsedJson.Key)
})
})
return win
},
async InitWebServer() {