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,18 +1,8 @@
import {
IHookFunctions,
IWebhookFunctions,
} from 'n8n-core';
import { IHookFunctions, IWebhookFunctions } from 'n8n-core';
import {
IDataObject,
INodeType,
INodeTypeDescription,
IWebhookResponseData,
} from 'n8n-workflow';
import { IDataObject, INodeType, INodeTypeDescription, IWebhookResponseData } from 'n8n-workflow';
import {
mailerliteApiRequest,
} from './GenericFunctions';
import { mailerliteApiRequest } from './GenericFunctions';
export class MailerLiteTrigger implements INodeType {
description: INodeTypeDescription = {
@@ -101,7 +91,7 @@ export class MailerLiteTrigger implements INodeType {
{
name: 'Subscriber Updated',
value: 'subscriber.update',
description: 'Fired when any of the subscriber\'s custom fields are updated',
description: "Fired when any of the subscriber's custom fields are updated",
},
],
required: true,
@@ -123,8 +113,7 @@ export class MailerLiteTrigger implements INodeType {
const endpoint = '/webhooks';
const { webhooks } = await mailerliteApiRequest.call(this, 'GET', endpoint, {});
for (const webhook of webhooks) {
if (webhook.url === webhookUrl &&
webhook.event === event) {
if (webhook.url === webhookUrl && webhook.event === event) {
// Set webhook-id to be sure that it can be deleted
webhookData.webhookId = webhook.id as string;
return true;
@@ -157,7 +146,6 @@ export class MailerLiteTrigger implements INodeType {
async delete(this: IHookFunctions): Promise<boolean> {
const webhookData = this.getWorkflowStaticData('node');
if (webhookData.webhookId !== undefined) {
const endpoint = `/webhooks/${webhookData.webhookId}`;
try {
@@ -181,9 +169,7 @@ export class MailerLiteTrigger implements INodeType {
const events = body.events as IDataObject[];
return {
workflowData: [
this.helpers.returnJsonArray(events),
],
workflowData: [this.helpers.returnJsonArray(events)],
};
}
}