update for the new resin.models.device.generateUniqueKey

This commit is contained in:
Eugene Mirotin 2016-12-16 17:36:16 +03:00 committed by Tim Perry
parent f17cbb1205
commit 7a0e8beb07
No known key found for this signature in database
GPG Key ID: 0DDE38AFD3AF94F0

View File

@ -143,7 +143,7 @@ exports.register =
resin.models.application.get(params.application).then (application) ->
Promise.try ->
return options.uuid or resin.models.device.generateUUID()
return options.uuid or resin.models.device.generateUniqueKey()
.then (uuid) ->
console.info("Registering to #{application.app_name}: #{uuid}")
return resin.models.device.register(application.app_name, uuid)