I wanted to save authUser object into fastify request before it comes into handler.
I did it like this in router.
fastify.route({
method: 'GET',
url: '/user',
preHandler: (
checkValidRequest,
checkValidUser
),
handler: controllers.getAllUsers
})
But It always comes into handler before it’s getting it from db. so, that means I can’t run async function into middleware in fastify?