ihp icon indicating copy to clipboard operation
ihp copied to clipboard

Improving the custom routing (with parameters)

Open fidel-ml opened this issue 2 years ago • 1 comments

When defining parseRoute', there is no easy access to query parameters. In general, param and all the family of param* functions depend on ControllerContext. But it wolud be better to make it depend on any context having access to a RequestContext, as the only operations that rely directly on the context seem to be paramOrError and allParams, and both use only the RequestContext inside the ControllerContext.

fidel-ml avatar Mar 18 '22 17:03 fidel-ml

Have you seen that this was merged? https://github.com/digitallyinduced/ihp/pull/1410/files Functions like paramOrError make sense inside a controller, but not inside the router parser, routing errors should be handled as 404 Not Found.

s0kil avatar Mar 19 '22 00:03 s0kil