mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
⚡ Minor improvements to ConvertKit-Node
This commit is contained in:
parent
8da0f6af4a
commit
426f0ae784
|
@ -6,9 +6,9 @@ import {
|
|||
import {
|
||||
IDataObject,
|
||||
INodeExecutionData,
|
||||
INodePropertyOptions,
|
||||
INodeTypeDescription,
|
||||
INodeType,
|
||||
INodePropertyOptions,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
|
@ -16,28 +16,28 @@ import {
|
|||
} from './GenericFunctions';
|
||||
|
||||
import {
|
||||
customFieldOperations,
|
||||
customFieldFields,
|
||||
customFieldOperations,
|
||||
} from './CustomFieldDescription';
|
||||
|
||||
import {
|
||||
formOperations,
|
||||
formFields,
|
||||
formOperations,
|
||||
} from './FormDescription';
|
||||
|
||||
import {
|
||||
sequenceOperations,
|
||||
sequenceFields,
|
||||
sequenceOperations,
|
||||
} from './SequenceDescription';
|
||||
|
||||
import {
|
||||
tagOperations,
|
||||
tagFields,
|
||||
tagOperations,
|
||||
} from './TagDescription';
|
||||
|
||||
import {
|
||||
tagSubscriberOperations,
|
||||
tagSubscriberFields,
|
||||
tagSubscriberOperations,
|
||||
} from './TagSubscriberDescription';
|
||||
|
||||
export class ConvertKit implements INodeType {
|
||||
|
@ -88,7 +88,7 @@ export class ConvertKit implements INodeType {
|
|||
value: 'tagSubscriber',
|
||||
},
|
||||
],
|
||||
default: 'customField',
|
||||
default: 'form',
|
||||
description: 'The resource to operate on.'
|
||||
},
|
||||
//--------------------
|
||||
|
|
|
@ -5,11 +5,11 @@ import {
|
|||
|
||||
import {
|
||||
IDataObject,
|
||||
ILoadOptionsFunctions,
|
||||
INodePropertyOptions,
|
||||
INodeTypeDescription,
|
||||
INodeType,
|
||||
IWebhookResponseData,
|
||||
ILoadOptionsFunctions,
|
||||
INodePropertyOptions,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
|
@ -282,11 +282,8 @@ export class ConvertKitTrigger implements INodeType {
|
|||
const endpoint = '/automations/hooks';
|
||||
|
||||
if (event === 'purchaseCreate') {
|
||||
|
||||
event = `purchase.${snakeCase(event)}`;
|
||||
|
||||
} else {
|
||||
|
||||
event = `subscriber.${snakeCase(event)}`;
|
||||
}
|
||||
|
||||
|
@ -344,11 +341,8 @@ export class ConvertKitTrigger implements INodeType {
|
|||
const endpoint = `/automations/hooks/${webhookData.webhookId}`;
|
||||
|
||||
try {
|
||||
|
||||
await convertKitApiRequest.call(this, 'DELETE', endpoint);
|
||||
|
||||
} catch (error) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import {
|
|||
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
IExecuteSingleFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import {
|
||||
|
|
Loading…
Reference in a new issue