n8n-3867-progressively-apply-prettier-to-all (#3873)

* 🔨 formatting nodes with prettier
This commit is contained in:
Michael Kret
2022-08-17 18:50:24 +03:00
committed by GitHub
parent f2d326c7f0
commit 91d7e16c81
1072 changed files with 42357 additions and 59109 deletions

View File

@@ -1,16 +1,8 @@
import {
OptionsWithUri,
} from 'request';
import { OptionsWithUri } from 'request';
import {
IExecuteFunctions,
IHookFunctions,
ILoadOptionsFunctions,
} from 'n8n-core';
import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n8n-core';
import {
IDataObject, NodeApiError,
} from 'n8n-workflow';
import { IDataObject, NodeApiError } from 'n8n-workflow';
export type Context = IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions;
@@ -24,9 +16,11 @@ export async function todoistApiRequest(
this: Context,
method: string,
resource: string,
// tslint:disable-next-line:no-any
body: any = {}, // tslint:disable-line:no-any
qs: IDataObject = {},
): Promise<any> { // tslint:disable-line:no-any
// tslint:disable-next-line:no-any
): Promise<any> {
const authentication = this.getNodeParameter('authentication', 0) as string;
const endpoint = 'api.todoist.com/rest/v1';
@@ -45,9 +39,8 @@ export async function todoistApiRequest(
try {
const credentialType = authentication === 'apiKey' ? 'todoistApi' : 'todoistOAuth2Api';
return await this.helpers.requestWithAuthentication.call(this, credentialType, options);
} catch (error) {
throw new NodeApiError(this.getNode(), (error));
throw new NodeApiError(this.getNode(), error);
}
}
@@ -55,7 +48,8 @@ export async function todoistSyncRequest(
this: Context,
body: any = {}, // tslint:disable-line:no-any
qs: IDataObject = {},
): Promise<any> { // tslint:disable-line:no-any
// tslint:disable-next-line:no-any
): Promise<any> {
const authentication = this.getNodeParameter('authentication', 0, 'oAuth2');
const options: OptionsWithUri = {
@@ -73,8 +67,7 @@ export async function todoistSyncRequest(
try {
const credentialType = authentication === 'oAuth2' ? 'todoistOAuth2Api' : 'todoistApi';
return await this.helpers.requestWithAuthentication.call(this, credentialType, options);
} catch (error) {
throw new NodeApiError(this.getNode(), (error));
throw new NodeApiError(this.getNode(), error);
}
}