mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-18 02:39:49 +00:00
Implement app restart command
This commit is contained in:
parent
e1a63fb548
commit
574d612624
@ -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?
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user