Merge pull request #208 from resin-io/jviotti/fix/manifest-device-type

Send device type correctly to getManifestBySlug
This commit is contained in:
Juan Cruz Viotti 2015-09-30 12:06:45 -04:00
commit 3a148217e0
2 changed files with 2 additions and 1 deletions

View File

@ -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) {

View File

@ -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