N8N-4126 credentials injection and testing on specific nodes (#3816)

* Add credential injection and testing to Lemlist, Uproc, Supabase, Segment, Phantombuster, Mailgun and Dropcontact
This commit is contained in:
agobrech
2022-08-24 10:26:48 +02:00
committed by GitHub
parent 5285fc1de6
commit 76f9ad8bae
15 changed files with 167 additions and 114 deletions

View File

@@ -173,17 +173,13 @@ export class Mailgun implements INodeType {
method: 'POST',
formData,
uri: `https://${credentials.apiDomain}/v3/${credentials.emailDomain}/messages`,
auth: {
user: 'api',
pass: credentials.apiKey as string,
},
json: true,
};
let responseData;
try {
responseData = await this.helpers.request(options);
responseData = await this.helpers.requestWithAuthentication.call(this, 'mailgunApi', options);
} catch (error) {
throw new NodeApiError(this.getNode(), error);
}