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,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)],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user