-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
typescriptTypeScript relatedTypeScript relatedwontfixThis will not be worked on, the behavior is intendedThis will not be worked on, the behavior is intended
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure it has not already been reported
Fastify version
3.20.2
Plugin version
3.0.0
Node.js version
12.22.3
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
10.15.7
Description
I tried to call preParsing hook using the async way as suggested in the documentation:
fastify.addHook('preParsing', async (request, reply, payload) => {
// Some code
return payload;
})and when i take a look at my terminal i found this warning:
(node:37541) [FSTDEP004] FastifyDeprecation: You are using the legacy preParsing hook signature. Use the one suggested in the documentation instead.
server listening on http://[::1]:4321then i tried the other way:
fastify.addHook('preParsing', (request, reply, payload, done) => {
// Some code
return done(null, payload);
})i didnt find any warning.
Steps to Reproduce
- Create a fastify server
- Add
preParsinghook using the code above
Expected Behavior
No response
Metadata
Metadata
Assignees
Labels
typescriptTypeScript relatedTypeScript relatedwontfixThis will not be worked on, the behavior is intendedThis will not be worked on, the behavior is intended