MCPcopy
hub / github.com/directus/directus / runOperationFlow

Method runOperationFlow

api/src/flows.ts:118–131  ·  view source on GitHub ↗
(id: string, data: unknown, context: Record<string, unknown>)

Source from the content-addressed store, hash-verified

116 }
117
118 public async runOperationFlow(id: string, data: unknown, context: Record<string, unknown>): Promise<unknown> {
119 if (this.reloadQueue.pending > 0) await this.reloadQueue.onIdle();
120
121 const logger = useLogger();
122
123 if (!(id in this.operationFlowHandlers)) {
124 logger.warn(`Couldn't find operation triggered flow with id "${id}"`);
125 return null;
126 }
127
128 const handler = this.operationFlowHandlers[id];
129
130 return handler(data, context);
131 }
132
133 public async runWebhookFlow(
134 id: string,

Callers 1

index.tsFile · 0.80

Calls 2

useLoggerFunction · 0.85
handlerFunction · 0.50

Tested by

no test coverage detected