Minor improvements to ConvertKit-Node

This commit is contained in:
Jan Oberhauser 2020-08-25 23:16:38 +02:00
parent 8da0f6af4a
commit 426f0ae784
3 changed files with 14 additions and 20 deletions

View file

@ -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.'
},
//--------------------

View file

@ -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;
}

View file

@ -4,8 +4,8 @@ import {
import {
IExecuteFunctions,
ILoadOptionsFunctions,
IExecuteSingleFunctions,
ILoadOptionsFunctions,
} from 'n8n-core';
import {