mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
n8n-3867-progressively-apply-prettier-to-all (#3873)
* 🔨 formatting nodes with prettier
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
import {
|
||||
OptionsWithUri,
|
||||
} from 'request';
|
||||
import { OptionsWithUri } from 'request';
|
||||
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core';
|
||||
|
||||
import {
|
||||
IDataObject,
|
||||
@@ -15,12 +10,15 @@ import {
|
||||
NodeOperationError,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
get,
|
||||
} from 'lodash';
|
||||
|
||||
export async function mondayComApiRequest(this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, body: any = {}, option: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
||||
import { get } from 'lodash';
|
||||
|
||||
export async function mondayComApiRequest(
|
||||
this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions,
|
||||
// tslint:disable-next-line:no-any
|
||||
body: any = {},
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const authenticationMethod = this.getNodeParameter('authentication', 0) as string;
|
||||
|
||||
const endpoint = 'https://api.monday.com/v2/';
|
||||
@@ -43,7 +41,6 @@ export async function mondayComApiRequest(this: IExecuteFunctions | IWebhookFunc
|
||||
|
||||
return await this.helpers.request!(options);
|
||||
} else {
|
||||
|
||||
return await this.helpers.requestOAuth2!.call(this, 'mondayComOAuth2Api', options);
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -51,8 +48,13 @@ export async function mondayComApiRequest(this: IExecuteFunctions | IWebhookFunc
|
||||
}
|
||||
}
|
||||
|
||||
export async function mondayComApiRequestAllItems(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, propertyName: string, body: any = {}): Promise<any> { // tslint:disable-line:no-any
|
||||
|
||||
export async function mondayComApiRequestAllItems(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
propertyName: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
body: any = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
let responseData;
|
||||
@@ -63,8 +65,6 @@ export async function mondayComApiRequestAllItems(this: IHookFunctions | IExecut
|
||||
responseData = await mondayComApiRequest.call(this, body);
|
||||
returnData.push.apply(returnData, get(responseData, propertyName));
|
||||
body.variables.page++;
|
||||
} while (
|
||||
get(responseData, propertyName).length > 0
|
||||
);
|
||||
} while (get(responseData, propertyName).length > 0);
|
||||
return returnData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user