feat: Rewrite Front End cloud and posthog hooks using TypeScript (no-changelog) (#5491)

This commit is contained in:
Alex Grozav
2023-11-13 15:10:42 +02:00
committed by GitHub
parent 3dfabc37d8
commit a262c450f7
41 changed files with 1439 additions and 131 deletions

View File

@@ -1,12 +1,8 @@
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);
},
run: runExternalHook,
};
}