mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-19 05:37:53 +00:00
Allow lockfile force to be specified in the request body
This commit is contained in:
parent
d5ddad914e
commit
53ed41a4e2
@ -94,10 +94,11 @@ module.exports = (secret) ->
|
||||
|
||||
api.post '/v1/restart', (req, res) ->
|
||||
appId = req.body.appId
|
||||
force = req.body.force
|
||||
utils.mixpanelTrack('Restart container', appId)
|
||||
if !appId?
|
||||
return res.status(400).send('Missing app id')
|
||||
Promise.using application.lockUpdates(appId, true), ->
|
||||
Promise.using application.lockUpdates(appId, force), ->
|
||||
knex('app').select().where({ appId })
|
||||
.then ([ app ]) ->
|
||||
if !app?
|
||||
|
Loading…
Reference in New Issue
Block a user