HonoH
Hono15mo 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()
      }
    )
  )
Was this page helpful?