mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-21 10:01:55 +00:00
Use versioned API endpoints
This commit is contained in:
parent
91b59abd42
commit
f10fb532c6
@ -13,7 +13,7 @@ blink = (ms = 200) ->
|
|||||||
.then(-> utils.delay(ms))
|
.then(-> utils.delay(ms))
|
||||||
.then(-> fs.writeFileAsync(LED_FILE, 0))
|
.then(-> fs.writeFileAsync(LED_FILE, 0))
|
||||||
|
|
||||||
api.post('/blink', (req, res) ->
|
api.post('/v1/blink', (req, res) ->
|
||||||
interval = setInterval(blink, 400)
|
interval = setInterval(blink, 400)
|
||||||
setTimeout(->
|
setTimeout(->
|
||||||
clearInterval(interval)
|
clearInterval(interval)
|
||||||
@ -21,7 +21,7 @@ api.post('/blink', (req, res) ->
|
|||||||
res.send(200)
|
res.send(200)
|
||||||
)
|
)
|
||||||
|
|
||||||
api.post('/update', (req, res) ->
|
api.post('/v1/update', (req, res) ->
|
||||||
console.log('TODO: Update the application')
|
console.log('TODO: Update the application')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user