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>
13 lines
418 B
TypeScript
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);
|
|
},
|
|
};
|
|
}
|