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,7 +1,4 @@
import {
IHookFunctions,
IWebhookFunctions,
} from 'n8n-core';
import { IHookFunctions, IWebhookFunctions } from 'n8n-core';
import {
ICredentialDataDecryptedObject,
@@ -10,15 +7,11 @@ import {
IWebhookResponseData,
} from 'n8n-workflow';
import {
pipedriveApiRequest,
} from './GenericFunctions';
import { pipedriveApiRequest } from './GenericFunctions';
import basicAuth from 'basic-auth';
import {
Response,
} from 'express';
import { Response } from 'express';
function authorizationError(resp: Response, realm: string, responseCode: number, message?: string) {
if (message === undefined) {
@@ -56,9 +49,7 @@ export class PipedriveTrigger implements INodeType {
required: true,
displayOptions: {
show: {
authentication: [
'apiToken',
],
authentication: ['apiToken'],
},
},
},
@@ -67,9 +58,7 @@ export class PipedriveTrigger implements INodeType {
required: true,
displayOptions: {
show: {
authentication: [
'oAuth2',
],
authentication: ['oAuth2'],
},
},
},
@@ -78,9 +67,7 @@ export class PipedriveTrigger implements INodeType {
required: true,
displayOptions: {
show: {
incomingAuthentication: [
'basicAuth',
],
incomingAuthentication: ['basicAuth'],
},
},
},
@@ -244,9 +231,11 @@ export class PipedriveTrigger implements INodeType {
}
for (const existingData of responseData.data) {
if (existingData.subscription_url === webhookUrl
&& existingData.event_action === eventAction
&& existingData.event_object === eventObject) {
if (
existingData.subscription_url === webhookUrl &&
existingData.event_action === eventAction &&
existingData.event_object === eventObject
) {
// The webhook exists already
webhookData.webhookId = existingData.id;
return true;
@@ -354,16 +343,17 @@ export class PipedriveTrigger implements INodeType {
return authorizationError(resp, realm, 401);
}
if (basicAuthData.name !== httpBasicAuth!.user || basicAuthData.pass !== httpBasicAuth!.password) {
if (
basicAuthData.name !== httpBasicAuth!.user ||
basicAuthData.pass !== httpBasicAuth!.password
) {
// Provided authentication data is wrong
return authorizationError(resp, realm, 403);
}
}
return {
workflowData: [
this.helpers.returnJsonArray(req.body),
],
workflowData: [this.helpers.returnJsonArray(req.body)],
};
}
}