Skip to content

Commit c5ce365

Browse files
committed
Use query variable to force update check
1 parent a653b93 commit c5ce365

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/node/routes/update.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,8 @@ router.use((req, _, next) => {
1212
next()
1313
})
1414

15-
router.get("/", async (_, res) => {
16-
const update = await provider.getUpdate()
17-
res.json({
18-
checked: update.checked,
19-
latest: update.version,
20-
current: version,
21-
isLatest: provider.isLatestVersion(update),
22-
})
23-
})
24-
25-
// This route will force a check.
26-
router.get("/check", async (_, res) => {
27-
const update = await provider.getUpdate(true)
15+
router.get("/", async (req, res) => {
16+
const update = await provider.getUpdate(req.query.force === "true")
2817
res.json({
2918
checked: update.checked,
3019
latest: update.version,

0 commit comments

Comments
 (0)