Auto-merge for PR #588 via VersionBot

Fix the check for whether the device  is provisioned by correctly get…
This commit is contained in:
resin-io-versionbot[bot] 2018-03-15 01:38:11 +00:00 committed by GitHub
commit a2287dd8b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 3 deletions

View File

@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).
## v7.1.13 - 2018-03-15
* Fix typo passing apiKey to the resin API client when exchanging apikeys #588 [Pablo Carranza Velez]
* Fix the check for whether the device is provisioned by correctly getting registered_at and deviceId from config.json into the ApiBinder #588 [Pablo Carranza Velez]
## v7.1.12 - 2018-03-15
* Compose: Use the hostname on the host as default hostname for services with host network mode #586 [Pablo Carranza Velez]

View File

@ -1,7 +1,7 @@
{
"name": "resin-supervisor",
"description": "This is resin.io's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as Resin's API informs it to.",
"version": "7.1.12",
"version": "7.1.13",
"license": "Apache-2.0",
"repository": {
"type": "git",

View File

@ -103,13 +103,15 @@ module.exports = class APIBinder
return null
fetchDevice: (uuid, apiKey, timeout) =>
@resinApi.get
reqOpts = {
resource: 'device'
options:
filter:
uuid: uuid
passthrough:
headers: Authorization: "Bearer: #{apiKey}"
headers: Authorization: "Bearer #{apiKey}"
}
@resinApi.get(reqOpts)
.get(0)
.catchReturn(null)
.timeout(timeout)

View File

@ -59,6 +59,8 @@ module.exports = class Config extends EventEmitter
'deviceType'
'resinApiEndpoint'
'apiTimeout'
'registered_at'
'deviceId'
]).then (conf) ->
return {
uuid: conf.uuid
@ -69,6 +71,8 @@ module.exports = class Config extends EventEmitter
deviceApiKey: conf.deviceApiKey
apiEndpoint: conf.resinApiEndpoint
apiTimeout: conf.apiTimeout
registered_at: conf.registered_at
deviceId: conf.deviceId
}
mixpanelHost: =>