MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / handleWebhook

Function handleWebhook

apps/web/src/lib/bot/webhook-handler.ts:7–16  ·  view source on GitHub ↗
(platform: string, request: Request)

Source from the content-addressed store, hash-verified

5type Platform = keyof typeof bot.webhooks;
6
7export function handleWebhook(platform: string, request: Request): Response | Promise<Response> {
8 const handler = bot.webhooks[platform as Platform];
9 if (!handler) {
10 return new Response('Unknown platform', { status: 404 });
11 }
12
13 return handler(request, {
14 waitUntil: task => after(() => task),
15 });
16}

Callers 1

POSTFunction · 0.90

Calls 1

handlerFunction · 0.50

Tested by

no test coverage detected