Skip to content

Commit

Permalink
Optimize auto update
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Jan 18, 2022
1 parent 2868ae0 commit 5cc0d32
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,18 @@ const createWindows = () => {
* Auto update on Windows
*/
if (dev === false && platform === "windows") {
autoUpdater.checkForUpdates()
axios
.get("https://api.levminer.com/api/v1/authme/releases")
.then((res) => {
if (res.data.tag_name > authme_version && res.data.tag_name != undefined) {
autoUpdater.checkForUpdates()
} else {
logger.log("No auto update found")
}
})
.catch((error) => {
logger.error("Error during looking for auto update", error.stack)
})
}

autoUpdater.on("checking-for-update", () => {
Expand Down

0 comments on commit 5cc0d32

Please sign in to comment.