From 36ec81f62489a7bc3442e46048f92d2ae9de1ce7 Mon Sep 17 00:00:00 2001 From: freya Date: Tue, 13 Sep 2022 12:41:08 +0100 Subject: [PATCH] fix(node): Google Cloud Storage linting rules --- .../nodes/Google/CloudStorage/ObjectDescription.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/nodes-base/nodes/Google/CloudStorage/ObjectDescription.ts b/packages/nodes-base/nodes/Google/CloudStorage/ObjectDescription.ts index e2295601ceb98..f3bec51a27864 100644 --- a/packages/nodes-base/nodes/Google/CloudStorage/ObjectDescription.ts +++ b/packages/nodes-base/nodes/Google/CloudStorage/ObjectDescription.ts @@ -177,8 +177,9 @@ export const objectOperations: INodeProperties[] = [ body.append('file', content, { contentType }); // Set the headers - requestOptions.headers!!['Content-Length'] = body.getLengthSync(); - requestOptions.headers!![ + if (!requestOptions.headers) requestOptions.headers = {}; + requestOptions.headers['Content-Length'] = body.getLengthSync(); + requestOptions.headers[ 'Content-Type' ] = `multipart/related; boundary=${body.getBoundary()}`; @@ -277,8 +278,7 @@ export const objectOperations: INodeProperties[] = [ method: 'GET', url: '={{"/b/" + $parameter["bucketName"] + "/o/"}}', returnFullResponse: true, - qs: { - }, + qs: {}, }, send: { preSend: [ @@ -339,8 +339,7 @@ export const objectOperations: INodeProperties[] = [ request: { method: 'PATCH', url: '={{"/b/" + $parameter["bucketName"] + "/o/" + $parameter["objectName"]}}', - qs: { - }, + qs: {}, body: {}, }, send: {