n8n/packages/nodes-base/nodes/Mattermost/v1/MattermostV1.node.ts
Omar Ajoue 2e57d86fd6
Change the place where output format is made (#2506)
The router file now correctly returns a `INodeExecutionData[][]`
instead of a simple `INodeExecutionData[]` forcing the main node
file to correct this.
2022-01-21 10:32:16 +01:00

32 lines
632 B
TypeScript

import {
IExecuteFunctions,
} from 'n8n-core';
import {
INodeType,
INodeTypeBaseDescription,
INodeTypeDescription,
} from 'n8n-workflow';
import { versionDescription } from './actions/versionDescription';
import { loadOptions } from './methods';
import { router } from './actions/router';
export class MattermostV1 implements INodeType {
description: INodeTypeDescription;
constructor(baseDescription: INodeTypeBaseDescription) {
this.description = {
...baseDescription,
...versionDescription,
};
}
methods = { loadOptions };
async execute(this: IExecuteFunctions) {
return await router.call(this);
}
}