Use query variable to force update check

This commit is contained in:
Asher 2020-11-03 16:13:41 -06:00
parent a653b93ce2
commit c5ce365482
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
1 changed files with 2 additions and 13 deletions

View File

@ -12,19 +12,8 @@ router.use((req, _, next) => {
next() next()
}) })
router.get("/", async (_, res) => { router.get("/", async (req, res) => {
const update = await provider.getUpdate() const update = await provider.getUpdate(req.query.force === "true")
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)
res.json({ res.json({
checked: update.checked, checked: update.checked,
latest: update.version, latest: update.version,