mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-27 20:55:25 +00:00
Use query variable to force update check
This commit is contained in:
parent
a653b93ce2
commit
c5ce365482
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user