Skip to content

Commit 0a39687

Browse files
authored
fix: onSend hook (#832)
1 parent 31b5594 commit 0a39687

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/http/plugins/log-request.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ export const logRequest = (options: RequestLoggerOptions) =>
8181
}
8282
})
8383

84-
fastify.addHook('onSend', async (req) => {
84+
fastify.addHook('onSend', async (req, _, payload) => {
8585
req.executionTime = Date.now() - req.startTime
86+
return payload
8687
})
8788

8889
fastify.addHook('onResponse', async (req, reply) => {

0 commit comments

Comments
 (0)