mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-21 22:47:48 +00:00
Send device type correctly to getManifestBySlug
Currently, we we're sending the wholea device object to `getManifestBySlug`, which ended up in an unsupported device error.
This commit is contained in:
parent
5ae83d8337
commit
79d1892b66
@ -104,7 +104,7 @@
|
||||
permission: 'user',
|
||||
action: function(params, options, done) {
|
||||
console.info('Initializing device');
|
||||
return resin.models.device.get(params.uuid).then(resin.models.device.getManifestBySlug).then(function(manifest) {
|
||||
return resin.models.device.get(params.uuid).get('device_type').then(resin.models.device.getManifestBySlug).then(function(manifest) {
|
||||
var ref;
|
||||
return (ref = manifest.initialization) != null ? ref.options : void 0;
|
||||
}).then(form.run).tap(function(answers) {
|
||||
|
@ -108,6 +108,7 @@ exports.initialize =
|
||||
action: (params, options, done) ->
|
||||
console.info('Initializing device')
|
||||
resin.models.device.get(params.uuid)
|
||||
.get('device_type')
|
||||
.then(resin.models.device.getManifestBySlug)
|
||||
.then (manifest) ->
|
||||
return manifest.initialization?.options
|
||||
|
Loading…
Reference in New Issue
Block a user