mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 08:34:07 -08:00
953a58f18b
Github issue / Community forum post (link here to close automatically): --------- Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in> Co-authored-by: Giulio Andreini <andreini@netseven.it>
25 lines
780 B
TypeScript
25 lines
780 B
TypeScript
import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
|
|
import { VersionedNodeType } from 'n8n-workflow';
|
|
import { FormTriggerV1 } from './v1/FormTriggerV1.node';
|
|
import { FormTriggerV2 } from './v2/FormTriggerV2.node';
|
|
|
|
export class FormTrigger extends VersionedNodeType {
|
|
constructor() {
|
|
const baseDescription: INodeTypeBaseDescription = {
|
|
displayName: 'n8n Form Trigger',
|
|
name: 'formTrigger',
|
|
icon: 'file:form.svg',
|
|
group: ['trigger'],
|
|
description: 'Runs the flow when an n8n generated webform is submitted',
|
|
defaultVersion: 2,
|
|
};
|
|
|
|
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
|
1: new FormTriggerV1(baseDescription),
|
|
2: new FormTriggerV2(baseDescription),
|
|
};
|
|
|
|
super(nodeVersions, baseDescription);
|
|
}
|
|
}
|