mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
⚡ Improvements to ConvertKit-Trigger
This commit is contained in:
@@ -39,12 +39,19 @@ export async function convertKitApiRequest(this: IExecuteFunctions | IExecuteSin
|
||||
delete options.body;
|
||||
}
|
||||
|
||||
console.log(options);
|
||||
// it's a webhook so include the api secret on the body
|
||||
if ((options.uri as string).includes('/automations/hooks')) {
|
||||
options.body['api_secret'] = credentials.apiSecret;
|
||||
} else {
|
||||
qs.api_secret = credentials.apiSecret;
|
||||
}
|
||||
|
||||
if (Object.keys(options.qs).length === 0) {
|
||||
delete options.qs;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
qs.api_secret = credentials.apiSecret;
|
||||
|
||||
return await this.helpers.request!(options);
|
||||
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user