mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-01 08:47:56 +00:00
Respond to reboot and shutdown endpoints with a success object
Change-type: patch Closes: #607 Signed-off-by: Cameron Diver <cameron@resin.io>
This commit is contained in:
parent
b4fc2edfe2
commit
393671505c
@ -368,9 +368,13 @@ module.exports = class DeviceState extends EventEmitter
|
||||
else
|
||||
switch step.action
|
||||
when 'reboot'
|
||||
@reboot(force, skipLock)
|
||||
# There isn't really a way that these methods can fail,
|
||||
# and if they do, we wouldn't know about it until after
|
||||
# the response has been sent back to the API. Just return
|
||||
# "OK" for this and the below action
|
||||
@reboot(force, skipLock).return(Data: 'OK', Error: null)
|
||||
when 'shutdown'
|
||||
@shutdown(force, skipLock)
|
||||
@shutdown(force, skipLock).return(Data: 'OK', Error: null)
|
||||
when 'noop'
|
||||
Promise.resolve()
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user