Use versioned API endpoints

This commit is contained in:
Petros Aggelatos 2013-12-23 04:29:48 +00:00 committed by Pablo Carranza Vélez
parent 91b59abd42
commit f10fb532c6

View File

@ -13,7 +13,7 @@ blink = (ms = 200) ->
.then(-> utils.delay(ms))
.then(-> fs.writeFileAsync(LED_FILE, 0))
api.post('/blink', (req, res) ->
api.post('/v1/blink', (req, res) ->
interval = setInterval(blink, 400)
setTimeout(->
clearInterval(interval)
@ -21,7 +21,7 @@ api.post('/blink', (req, res) ->
res.send(200)
)
api.post('/update', (req, res) ->
api.post('/v1/update', (req, res) ->
console.log('TODO: Update the application')
)