feat: Rewrite Front End cloud and posthog hooks using TypeScript (no-changelog) (#5491)
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user