router.param handler called once per middleware i/o once per request
jbemmel opened this issue · comments
J vanBemmel commented
Using koa-router 7.4.0 I use the following:
router.param( "someParam", (ctxt,next) => { ... } );
router.use( "/:someParam/path", middleware );
router.get( "/:someParam/path/x", (ctxt) => { ... } );
The handler for 'someParam' is called twice: Once for the middleware, and a second time for the 'get' route. It should be called only once per request