Open acidjazz opened 1 month ago
Are you saying I should use onRequest: []
instead of before: []
?
I think the documentation for defineEventHandler
is incomplete.
there is no example of how to apply defineEventHandler
with object syntax.
what if i want to create middleware at a non-global route level. did i make defineEventHandler
in another file that accepts the object event
then I called it on the body defineEventHandler
by inserting an event
object in the route level?
Environment
I noticed that in this merge https://github.com/unjs/h3/pull/485 there is
before: []
- i tried something like this:Reproduction
Just run the above code in a route
Describe the bug
not sure if i'm using
before: []
incorrectly?Additional context
No response
Logs
No response