mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-07 11:31:15 +00:00
Implement app restart command
This commit is contained in:
parent
e1a63fb548
commit
574d612624
@ -1,6 +1,7 @@
|
|||||||
_ = require('lodash')
|
_ = require('lodash')
|
||||||
device = require('../device/device')
|
device = require('../device/device')
|
||||||
table = require('../table/table')
|
table = require('../table/table')
|
||||||
|
server = require('../server/server')
|
||||||
applicationModel = require('../models/application')
|
applicationModel = require('../models/application')
|
||||||
authHooks = require('../hooks/auth')
|
authHooks = require('../hooks/auth')
|
||||||
|
|
||||||
@ -30,3 +31,7 @@ exports.info = authHooks.failIfNotLoggedIn (id) ->
|
|||||||
|
|
||||||
.catch (error) ->
|
.catch (error) ->
|
||||||
throw 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')
|
app = require('./actions/app')
|
||||||
yargs.command('apps', app.list)
|
yargs.command('apps', app.list)
|
||||||
yargs.command('app <id>', app.info)
|
yargs.command('app <id>', app.info)
|
||||||
|
yargs.command('app restart <id>', app.restart)
|
||||||
|
|
||||||
# ---------- Device Module ----------
|
# ---------- Device Module ----------
|
||||||
device = require('./actions/device')
|
device = require('./actions/device')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user