diff --git a/packages/nodes-base/nodes/KoBoToolbox/GenericFunctions.ts b/packages/nodes-base/nodes/KoBoToolbox/GenericFunctions.ts index 7b8f8c8f7c..6a4783cd94 100644 --- a/packages/nodes-base/nodes/KoBoToolbox/GenericFunctions.ts +++ b/packages/nodes-base/nodes/KoBoToolbox/GenericFunctions.ts @@ -71,7 +71,7 @@ export async function koBoToolboxRawRequest( option.url = credentials.URL + option.url; } - return await this.helpers.httpRequestWithAuthentication.call(this, 'koBoToolboxApi', option); + return this.helpers.httpRequestWithAuthentication.call(this, 'koBoToolboxApi', option); } function parseGeoPoint(geoPoint: string): null | number[] { diff --git a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts index b9807c3931..7a1b39df3a 100644 --- a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts +++ b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts @@ -392,7 +392,7 @@ export class KoBoToolbox implements INodeType { if (operation === 'get') { const fileId = this.getNodeParameter('fileId', i) as string; - const download = this.getNodeParameter('download', i) as boolean; + const download = this.getNodeParameter('download', i); responseData = [ await koBoToolboxApiRequest.call(this, { @@ -400,7 +400,7 @@ export class KoBoToolbox implements INodeType { }), ]; - if (responseData && responseData[0] && download) { + if (responseData?.[0] && download) { const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; const binaryItem: INodeExecutionData = { @@ -444,7 +444,7 @@ export class KoBoToolbox implements INodeType { if ('binary' === fileMode) { const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string; const item = items[i].binary as IBinaryKeyData; - const binaryData = item[binaryPropertyName] as IBinaryData; + const binaryData = item[binaryPropertyName]; body.base64Encoded = 'data:' + binaryData.mimeType + ';base64,' + binaryData.data; body.metadata = {