Restart URL TODO

This commit is contained in:
Juan Cruz Viotti 2014-11-20 12:54:43 -04:00
parent 322fed866d
commit a189e21c30

View File

@ -4,6 +4,7 @@ table = require('../table/table')
server = require('../server/server')
applicationModel = require('../models/application')
authHooks = require('../hooks/auth')
config = require('../config')
exports.list = authHooks.failIfNotLoggedIn ->
applicationModel.getAll().then (applications) ->
@ -33,5 +34,7 @@ exports.info = authHooks.failIfNotLoggedIn (id) ->
throw error
exports.restart = authHooks.failIfNotLoggedIn (id) ->
# TODO: Move this URL to config
server.post "/application/#{id}/restart", (error) ->
throw error if error?