Merge pull request #217 from resin-io/jviotti/upgrade/sdk

Upgrade SDK to v3.0.0
This commit is contained in:
Juan Cruz Viotti 2015-10-12 09:03:59 -04:00
commit 494a286cae
3 changed files with 9 additions and 8 deletions

View File

@ -72,10 +72,10 @@
permission: 'user',
action: function(params, options, done) {
return resin.models.application.get(params.application).then(function(application) {
var uuid;
uuid = resin.models.device.generateUUID();
console.info("Registering to " + application.app_name + ": " + uuid);
return resin.models.device.register(application.app_name, uuid);
return resin.models.device.generateUUID().then(function(uuid) {
console.info("Registering to " + application.app_name + ": " + uuid);
return resin.models.device.register(application.app_name, uuid);
});
}).get('uuid').nodeify(done);
}
};

View File

@ -100,9 +100,10 @@ exports.register =
permission: 'user'
action: (params, options, done) ->
resin.models.application.get(params.application).then (application) ->
uuid = resin.models.device.generateUUID()
console.info("Registering to #{application.app_name}: #{uuid}")
return resin.models.device.register(application.app_name, uuid)
resin.models.device.generateUUID().then (uuid) ->
console.info("Registering to #{application.app_name}: #{uuid}")
return resin.models.device.register(application.app_name, uuid)
.get('uuid')
.nodeify(done)

View File

@ -59,7 +59,7 @@
"resin-image": "^1.1.4",
"resin-image-manager": "^3.2.2",
"resin-pine": "^1.3.0",
"resin-sdk": "^2.7.2",
"resin-sdk": "^3.0.0",
"resin-settings-client": "^3.1.0",
"resin-vcs": "^2.0.0",
"rimraf": "^2.4.3",