refactor: Consolidate redundant code in workflow execution-functions (no-changelog) (#4884)

* refactor: Consolidate redundant code in workflow interfaces (no-changelog)

* consolidate all execution-functions interfaces code

* move rawBody definition back

* address PR comments
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2022-12-23 18:27:07 +01:00
committed by GitHub
parent 2b1eb94906
commit 5cf70e1007
8 changed files with 342 additions and 1221 deletions

View File

@@ -391,7 +391,7 @@ export class RoutingNode {
return returnData;
}
if (action.type === 'binaryData') {
responseData.body = Buffer.from(responseData.body as string);
const body = (responseData.body = Buffer.from(responseData.body as string));
let { destinationProperty } = action.properties;
destinationProperty = this.getParameterValue(
@@ -403,7 +403,7 @@ export class RoutingNode {
false,
) as string;
const binaryData = await executeSingleFunctions.helpers.prepareBinaryData(responseData.body);
const binaryData = await executeSingleFunctions.helpers.prepareBinaryData(body);
return inputData.map((item) => {
if (typeof item.json === 'string') {