MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / eventRouter

Function eventRouter

apps/api/src/routes/event.router.ts:7–21  ·  view source on GitHub ↗
(fastify)

Source from the content-addressed store, hash-verified

5import { isBotHook } from '@/hooks/is-bot.hook';
6
7const eventRouter: FastifyPluginAsyncZodOpenApi = async (fastify) => {
8 fastify.addHook('preValidation', duplicateHook);
9 fastify.addHook('preHandler', clientHook);
10 fastify.addHook('preHandler', isBotHook);
11
12 fastify.route({
13 method: 'POST',
14 url: '/',
15 schema: {
16 tags: ['Event'],
17 description: 'Deprecated direct event ingestion endpoint. Use /track instead.',
18 },
19 handler: controller.postEvent,
20 });
21};
22
23export default eventRouter;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected