H
Hono4w ago
DJ

c.req.param() not work when using middleware combine

hi all, I can't get params inside "every" middleware, but it works in "some" middleware. is this a bug? how can i get params inside every?
export const m = (action: string, field: string): MiddlewareHandler =>
every(
createMiddleware<AppContext>(
(c, next) => {
// got empty object here.
console.log(c.req.param())
return next()
}
)
)
export const m = (action: string, field: string): MiddlewareHandler =>
every(
createMiddleware<AppContext>(
(c, next) => {
// got empty object here.
console.log(c.req.param())
return next()
}
)
)
1 Reply
DJ
DJOP4w ago
I've read source codes I believe this is a bug
Want results from more Discord servers?
Add your server