MCPcopy
hub / github.com/fastify/fastify / onSendHook

Function onSendHook

lib/reply.js:543–555  ·  view source on GitHub ↗
(reply, payload)

Source from the content-addressed store, hash-verified

541}
542
543function onSendHook (reply, payload) {
544 if (reply[kRouteContext].onSend !== null) {
545 onSendHookRunner(
546 reply[kRouteContext].onSend,
547 reply.request,
548 reply,
549 payload,
550 wrapOnSendEnd
551 )
552 } else {
553 onSendEnd(reply, payload)
554 }
555}
556
557function wrapOnSendEnd (err, request, reply, payload) {
558 if (err != null) {

Callers 2

reply.jsFile · 0.85
preSerializationHookEndFunction · 0.85

Calls 2

onSendHookRunnerFunction · 0.85
onSendEndFunction · 0.85

Tested by

no test coverage detected