mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-03 04:26:39 +00:00
Merge pull request #208 from resin-io/jviotti/fix/manifest-device-type
Send device type correctly to getManifestBySlug
This commit is contained in:
commit
3a148217e0
@ -104,7 +104,7 @@
|
|||||||
permission: 'user',
|
permission: 'user',
|
||||||
action: function(params, options, done) {
|
action: function(params, options, done) {
|
||||||
console.info('Initializing device');
|
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;
|
var ref;
|
||||||
return (ref = manifest.initialization) != null ? ref.options : void 0;
|
return (ref = manifest.initialization) != null ? ref.options : void 0;
|
||||||
}).then(form.run).tap(function(answers) {
|
}).then(form.run).tap(function(answers) {
|
||||||
|
@ -108,6 +108,7 @@ exports.initialize =
|
|||||||
action: (params, options, done) ->
|
action: (params, options, done) ->
|
||||||
console.info('Initializing device')
|
console.info('Initializing device')
|
||||||
resin.models.device.get(params.uuid)
|
resin.models.device.get(params.uuid)
|
||||||
|
.get('device_type')
|
||||||
.then(resin.models.device.getManifestBySlug)
|
.then(resin.models.device.getManifestBySlug)
|
||||||
.then (manifest) ->
|
.then (manifest) ->
|
||||||
return manifest.initialization?.options
|
return manifest.initialization?.options
|
||||||
|
Loading…
Reference in New Issue
Block a user