You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I would like to run middleware after the handler was executed.
Describe the solution you'd like
It will be great if I could run middleware in @UseMiddleware also after the handler was executed.
Describe alternatives you've considered
I saw this feature in next-api-middleware library but I would like to have it in next-api-decorators library as it already provides almost all features that we need.
Additional context
They implemented "winding and unwinding stack" concept, and the execution of the middleware code before or after the handler execution depends only on the implementation of the middleware.
To execute code after handler execution finished you just add await next() as first in your middleware.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I would like to run middleware after the handler was executed.
Describe the solution you'd like
It will be great if I could run middleware in
@UseMiddleware
also after the handler was executed.Describe alternatives you've considered
I saw this feature in next-api-middleware library but I would like to have it in
next-api-decorators
library as it already provides almost all features that we need.Additional context
They implemented "winding and unwinding stack" concept, and the execution of the middleware code before or after the handler execution depends only on the implementation of the middleware.
To execute code after handler execution finished you just add
await next()
as first in your middleware.The text was updated successfully, but these errors were encountered: