MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / handler

Function handler

apps/web/pages/api/webhook.ts:4–14  ·  view source on GitHub ↗
(req: NextApiRequest, res: NextApiResponse)

Source from the content-addressed store, hash-verified

2import { createWebhookJob } from 'queue/jobs';
3
4async function handler(req: NextApiRequest, res: NextApiResponse) {
5 if (!!req.body.challenge) {
6 res.status(200).json(req.body.challenge);
7 return;
8 }
9
10 await createWebhookJob(req.body);
11
12 res.status(200).json({});
13 return;
14}
15
16export default handler;

Callers

nothing calls this directly

Calls 1

createWebhookJobFunction · 0.90

Tested by

no test coverage detected