Skip to content

Commit

Permalink
Better way of checking for updates added
Browse files Browse the repository at this point in the history
  • Loading branch information
Ascensionist committed Oct 23, 2024
1 parent 93181da commit 148602a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 148602a

Please sign in to comment.