mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 05:37:51 +00:00
Make use of resin.models.device.getSupportedDeviceTypes() asynchronously
This commit is contained in:
parent
65729012b6
commit
a6a3eeae6d
@ -134,9 +134,11 @@ exports.supported =
|
||||
$ resin devices supported
|
||||
'''
|
||||
permission: 'user'
|
||||
action: ->
|
||||
devices = resin.models.device.getSupportedDeviceTypes()
|
||||
_.each(devices, _.unary(console.log))
|
||||
action: (params, options, done) ->
|
||||
resin.models.device.getSupportedDeviceTypes (error, devices) ->
|
||||
return done(error) if error?
|
||||
_.each(devices, _.unary(console.log))
|
||||
done()
|
||||
|
||||
exports.init =
|
||||
signature: 'device init [device]'
|
||||
|
Loading…
Reference in New Issue
Block a user