mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 11:49:59 +00:00
⚡ Added improvements
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { OptionsWithUri } from 'request';
|
||||
import {
|
||||
OptionsWithUri,
|
||||
} from 'request';
|
||||
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
@@ -11,6 +13,10 @@ import {
|
||||
IWebhookFunctions
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
get,
|
||||
} from 'lodash';
|
||||
|
||||
export async function mondayApiRequest(this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, body: any = {}, option: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
||||
|
||||
const credentials = this.getCredentials('mondayApi');
|
||||
@@ -53,10 +59,10 @@ export async function mondayApiRequestAllItems(this: IHookFunctions | IExecuteFu
|
||||
|
||||
do {
|
||||
responseData = await mondayApiRequest.call(this, body);
|
||||
returnData.push.apply(returnData, responseData['data'][propertyName]);
|
||||
returnData.push.apply(returnData, get(responseData, propertyName));
|
||||
body.variables.page++;
|
||||
} while (
|
||||
responseData['data'][propertyName].length > 0
|
||||
get(responseData, propertyName).length > 0
|
||||
);
|
||||
return returnData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user