mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 11:49:59 +00:00
refactor: Format nodes-base package (A-F) (#3800)
* 🔨 prettier formated nodes - A * 🔨 prettier formated nodes - B * ⚡ prettier formated nodes - C * ⚡ prettier formated nodes - D * ⚡ prettier formated nodes - E-F * 🎨 Adjust nodes-base formatting command (#3805) * Format additional files in nodes A-F (#3811) * ⚡ fixes * 🎨 Add Mindee to ignored dirs Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
@@ -8,11 +8,7 @@ import {
|
||||
IWebhookResponseData,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
emeliaApiRequest,
|
||||
emeliaApiTest,
|
||||
emeliaGraphqlRequest,
|
||||
} from './GenericFunctions';
|
||||
import { emeliaApiRequest, emeliaApiTest, emeliaGraphqlRequest } from './GenericFunctions';
|
||||
|
||||
interface Campaign {
|
||||
_id: string;
|
||||
@@ -53,7 +49,8 @@ export class EmeliaTrigger implements INodeType {
|
||||
displayName: 'Campaign Name or ID',
|
||||
name: 'campaignId',
|
||||
type: 'options',
|
||||
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getCampaigns',
|
||||
},
|
||||
@@ -115,12 +112,10 @@ export class EmeliaTrigger implements INodeType {
|
||||
variables: '{}',
|
||||
});
|
||||
|
||||
return responseData.data.campaigns.map(
|
||||
(campaign: Campaign) => ({
|
||||
name: campaign.name,
|
||||
value: campaign._id,
|
||||
}),
|
||||
);
|
||||
return responseData.data.campaigns.map((campaign: Campaign) => ({
|
||||
name: campaign.name,
|
||||
value: campaign._id,
|
||||
}));
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -147,7 +142,7 @@ export class EmeliaTrigger implements INodeType {
|
||||
const campaignId = this.getNodeParameter('campaignId') as string;
|
||||
const body = {
|
||||
hookUrl: webhookUrl,
|
||||
events: events.map(e => e.toUpperCase()),
|
||||
events: events.map((e) => e.toUpperCase()),
|
||||
campaignId,
|
||||
};
|
||||
|
||||
@@ -179,9 +174,7 @@ export class EmeliaTrigger implements INodeType {
|
||||
async webhook(this: IWebhookFunctions): Promise<IWebhookResponseData> {
|
||||
const req = this.getRequestObject();
|
||||
return {
|
||||
workflowData: [
|
||||
this.helpers.returnJsonArray(req.body),
|
||||
],
|
||||
workflowData: [this.helpers.returnJsonArray(req.body)],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user