mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
Feature/paired item support (#3869)
* Add paired item helper and implement it in some nodes
This commit is contained in:
@@ -153,7 +153,7 @@ export class Zoom implements INodeType {
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData();
|
||||
const returnData: IDataObject[] = [];
|
||||
const returnData: INodeExecutionData[] = [];
|
||||
let qs: IDataObject = {};
|
||||
let responseData;
|
||||
const resource = this.getNodeParameter('resource', 0) as string;
|
||||
@@ -202,6 +202,10 @@ export class Zoom implements INodeType {
|
||||
responseData = await zoomApiRequest.call(this, 'GET', '/users/me/meetings', {}, qs);
|
||||
responseData = responseData.meetings;
|
||||
}
|
||||
responseData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
}
|
||||
if (operation === 'delete') {
|
||||
//https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingdelete
|
||||
@@ -773,20 +777,25 @@ export class Zoom implements INodeType {
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
if (Array.isArray(responseData)) {
|
||||
returnData.push.apply(returnData, responseData as IDataObject[]);
|
||||
} else {
|
||||
returnData.push(responseData as IDataObject);
|
||||
}
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(returnData),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
returnData.push({ error: error.message });
|
||||
const executionErrorData = {
|
||||
json: {} as IDataObject,
|
||||
error: error.message,
|
||||
itemIndex: i,
|
||||
};
|
||||
returnData.push(executionErrorData as INodeExecutionData);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
return [this.helpers.returnJsonArray(returnData)];
|
||||
return this.prepareOutputData(returnData);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user