mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-26 12:15:26 +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()
|
||||
})
|
||||
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user