diff --git a/src/node/routes/update.ts b/src/node/routes/update.ts index ea7479fe..b4fbc197 100644 --- a/src/node/routes/update.ts +++ b/src/node/routes/update.ts @@ -12,19 +12,8 @@ router.use((req, _, next) => { next() }) -router.get("/", async (_, res) => { - const update = await provider.getUpdate() - res.json({ - checked: update.checked, - latest: update.version, - current: version, - isLatest: provider.isLatestVersion(update), - }) -}) - -// This route will force a check. -router.get("/check", async (_, res) => { - const update = await provider.getUpdate(true) +router.get("/", async (req, res) => { + const update = await provider.getUpdate(req.query.force === "true") res.json({ checked: update.checked, latest: update.version,