From 148602a38aec27ac9f345b5204dacaadd5864f50 Mon Sep 17 00:00:00 2001 From: Ascensionist <138753635+Ascensionist@users.noreply.github.com> Date: Wed, 23 Oct 2024 22:31:19 +0500 Subject: [PATCH] Better way of checking for updates added --- app/src/server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/server.js b/app/src/server.js index 84953e8..e0bfd9a 100644 --- a/app/src/server.js +++ b/app/src/server.js @@ -600,11 +600,11 @@ app.get('/about', async(req, res) => { app.get('/updates', async(req, res) => { try { - const url = `https://raw.githubusercontent.com/Ascensionist/revisions/refs/heads/main/versions.json`; + const url = `https://raw.githubusercontent.com/SaturnMusic/PC/refs/heads/main/package.json`; let response = await axios.get(url); //New version - if (compareVersions(response.data.pc.latest, packageJson.version) >= 1) { - res.send(response.data.pc.versions[0]); + if (compareVersions(response.data.version, packageJson.version) >= 1) { + res.send(response.data); return; } if (process.env.NODE_ENV === 'canary') {