Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ fastify decorate reply|Add a reply decorator|ffdecoratereply
fastify hook onRequest|Add an instance fastify onRequest hook|ffonrequest, hookonrequest
fastify hook preParsing|Add an instance fastify preParsing hook|ffpreparsing, hookpreparsing
fastify hook preValidation|Add an instance fastify preValidation hook|ffprevalidation, hookprevalidation
fastify hook preHandler|Add an instance fastify preHandler hook|ffprehandler, hookprehandler
fastify hook preSerialization|Add an instance fastify preSerialization hook|ffpreserialization, hookpreserialization
fastify hook onError|Add an instance fastify onError hook|ffonerror, hookonerror
fastify hook onSend|Add an instance fastify onSend hook|ffonsend, hookonsend
Expand Down
14 changes: 14 additions & 0 deletions snippets/snippets-js.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,20 @@
],
"description": "Add an instance fastify preValidation hook"
},
"fastify hook preHandler": {
"scope": "javascript,typescript",
"prefix": [
"ffprehandler",
"hookprehandler"
],
"body": [
"fastify.addHook('preHandler', function hook (request, reply, done) {",
" $0",
" done(null)",
"})"
],
"description": "Add an instance fastify preHandler hook"
},
"fastify hook preSerialization": {
"scope": "javascript,typescript",
"prefix": [
Expand Down