Files
Automata/packages/editor-ui/src/composables/useExternalHooks.ts
Omar Ajoue 67092c0a1b fix: Account for nanoid workflow ids for subworkflow execute policy (#7094)
Github issue / Community forum post (link here to close automatically):

Since the change to allow workflow IDs to become strings in Nano ID
formats, this input broke.

This PR allows all characters that comprise workflow IDs.

---------

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
2023-09-13 09:56:58 +02:00

13 lines
418 B
TypeScript

import type { IExternalHooks } from '@/Interface';
import type { IDataObject } from 'n8n-workflow';
import { useWebhooksStore } from '@/stores/webhooks.store';
import { runExternalHook } from '@/utils';
export function useExternalHooks(): IExternalHooks {
return {
async run(eventName: string, metadata?: IDataObject): Promise<void> {
return runExternalHook(eventName, useWebhooksStore(), metadata);
},
};
}