Skip to content

fastifyHandler()

ts
function fastifyHandler(webhooks): (request, reply) => Promise<void>;

Handler de Fastify.

Necesita que la ruta reciba el cuerpo sin parsear:

ts
fastify.addContentTypeParser(
  'application/json',
  { parseAs: 'buffer' },
  (_request, body, done) => done(null, body),
);

Parameters

ParameterType
webhooksWebhooks

Returns

(request, reply) => Promise<void>