Fix typo passing apiKey to the resin API client when exchanging apikeys

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This commit is contained in:
Pablo Carranza Velez 2018-03-14 20:42:34 -03:00
parent 7e342e9d80
commit 75ce55e932

View File

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