From 1dccbaecd8a6cd8bf551e3b56131066e9de9ed35 Mon Sep 17 00:00:00 2001 From: Akis Kesoglou Date: Mon, 15 Jun 2020 13:57:32 +0300 Subject: [PATCH] Use API v6 See: https://github.com/balena-io/open-balena/issues/80 Change-type: minor --- src/api-binder.ts | 2 +- test/lib/mocked-balena-api.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api-binder.ts b/src/api-binder.ts index 2a974f88..cbb17798 100644 --- a/src/api-binder.ts +++ b/src/api-binder.ts @@ -153,7 +153,7 @@ export class APIBinder { return; } - const baseUrl = url.resolve(apiEndpoint, '/v5/'); + const baseUrl = url.resolve(apiEndpoint, '/v6/'); const passthrough = _.cloneDeep(await request.getRequestOptions()); passthrough.headers = passthrough.headers != null ? passthrough.headers : {}; diff --git a/test/lib/mocked-balena-api.ts b/test/lib/mocked-balena-api.ts index 185b5e53..e9a5c2f7 100644 --- a/test/lib/mocked-balena-api.ts +++ b/test/lib/mocked-balena-api.ts @@ -51,7 +51,7 @@ api.post('/device/register', (req, res) => api.balenaBackend!.registerHandler(req, res, _.noop), ); -api.get('/v5/device', (req, res) => +api.get('/v6/device', (req, res) => api.balenaBackend!.getDeviceHandler(req, res, _.noop), );