finish update dialog

This commit is contained in:
HorizonCode committed 2024-01-22 12:37:29 +01:00
1 parent 3570582c6b
commit bf8a458b5f
7 files changed
+141 -104

No files matched your search

+6 -2
View File
@@ -1,13 +1,16 @@
const semver = require("semver");
const { appVersion } = require("./appInfo");
const repoUrl =
const repoApiUrl =
"https://git.ez-pp.farm/api/v1/repos/EZPPFarm/EZPPLauncher/releases?limit=1";
const releasesUrl =
"https://git.ez-pp.farm/EZPPFarm/EZPPLauncher/releases/latest";
module.exports = {
updateAvailable: async () => {
try {
const latestRelease = await fetch(repoUrl);
const latestRelease = await fetch(repoApiUrl);
const json = await latestRelease.json();
if (json.length <= 0) return false;
return {
@@ -18,4 +21,5 @@ module.exports = {
return { update: false };
}
},
releasesUrl,
};