Hello, I have a question about some of the code concerning the Expresso project (link )
In the solution code of this project, we have a menuRouter and a nested menuItemsRouter.
The menuRouter takes the ‘/menu’ requests and has a menuRouter.param that basically attunes the ‘:menuId’ towards a specific value (req.menu) and gives a 404-status when the menuId doesn’t exist in the database.
The menuItemsRouter takes '/menu/:menuId/menu-items requests and is the nested router of menuRouter.
In my menuItemsRouter code, i didn’t handle “bad” /:menuId’s because i thought that already happenened in menuRouter.param, now the solution code makes me think that was a bad decision.
So basically, the thing that i am asking is the following:
if i get a '/menu/:menuId/menuItems request, and it is a for example a bad /:menuId, does this get handled in menuRouter or do I need separate code in the nested router?
All while using mergeparams:true of course.