(fastify)
| 5 | import { isBotHook } from '@/hooks/is-bot.hook'; |
| 6 | |
| 7 | const 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 | |
| 23 | export default eventRouter; |
nothing calls this directly
no outgoing calls
no test coverage detected