Implement app restart command

This commit is contained in:
Juan Cruz Viotti 2014-11-20 12:24:39 -04:00
parent e1a63fb548
commit 574d612624
2 changed files with 6 additions and 0 deletions

View File

@ -1,6 +1,7 @@
_ = require('lodash')
device = require('../device/device')
table = require('../table/table')
server = require('../server/server')
applicationModel = require('../models/application')
authHooks = require('../hooks/auth')
@ -30,3 +31,7 @@ exports.info = authHooks.failIfNotLoggedIn (id) ->
.catch (error) ->
throw error
exports.restart = authHooks.failIfNotLoggedIn (id) ->
server.post "/application/#{id}/restart", (error) ->
throw error if error?

View File

@ -18,6 +18,7 @@ yargs.command('signup', auth.signup)
app = require('./actions/app')
yargs.command('apps', app.list)
yargs.command('app <id>', app.info)
yargs.command('app restart <id>', app.restart)
# ---------- Device Module ----------
device = require('./actions/device')