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 {
pushcutApiRequest,
} from './GenericFunctions';
import { pushcutApiRequest } from './GenericFunctions';
export class PushcutTrigger implements INodeType {
description: INodeTypeDescription = {
@@ -47,7 +37,8 @@ export class PushcutTrigger implements INodeType {
displayName: 'Action Name',
name: 'actionName',
type: 'string',
description: 'Choose any name you would like. It will show up as a server action in the app.',
description:
'Choose any name you would like. It will show up as a server action in the app.',
default: '',
},
],
@@ -66,8 +57,7 @@ export class PushcutTrigger implements INodeType {
const webhooks = await pushcutApiRequest.call(this, 'GET', endpoint, {});
for (const webhook of webhooks) {
if (webhook.url === webhookUrl &&
webhook.actionName === actionName) {
if (webhook.url === webhookUrl && webhook.actionName === actionName) {
webhookData.webhookId = webhook.id;
return true;
}
@@ -100,7 +90,6 @@ export class PushcutTrigger implements INodeType {
async delete(this: IHookFunctions): Promise<boolean> {
const webhookData = this.getWorkflowStaticData('node');
if (webhookData.webhookId !== undefined) {
const endpoint = `/subscriptions/${webhookData.webhookId}`;
try {
@@ -122,9 +111,7 @@ export class PushcutTrigger implements INodeType {
const body = this.getBodyData() as IDataObject;
return {
workflowData: [
this.helpers.returnJsonArray(body),
],
workflowData: [this.helpers.returnJsonArray(body)],
};
}
}