From fb90042c3955e9a1a177076a711a12e226e0ab49 Mon Sep 17 00:00:00 2001 From: Pagan Gazzard Date: Mon, 18 May 2020 15:12:52 +0100 Subject: [PATCH] Switch to balenaApi for the state patch as patching cannot be cached Change-type: patch --- src/api-binder.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api-binder.ts b/src/api-binder.ts index 7c6fc855..0be26c96 100644 --- a/src/api-binder.ts +++ b/src/api-binder.ts @@ -456,7 +456,7 @@ export class APIBinder { stateDiff: DeviceStatus, conf: { apiEndpoint: string; uuid: string; localMode: boolean }, ) { - if (this.cachedBalenaApi == null) { + if (this.balenaApi == null) { throw new InternalInconsistencyError( 'Attempt to send report patch without an API client', ); @@ -483,10 +483,10 @@ export class APIBinder { url: endpoint, body, }, - this.cachedBalenaApi.passthrough, + this.balenaApi.passthrough, ); - await this.cachedBalenaApi._request(requestParams); + await this.balenaApi._request(requestParams); } // Returns an object that contains only status fields relevant for the local mode.