rnett03/31/2021, 3:51 AM
. However some of the functions make use of Ktor routing like
. This doesn't play nice with the routes because of ambiguity. If I put the authenticate and the handlers (w/
) in the same route, the authenticate is always taken. If I each handler in it's own
, the sibling
is never taken. And even without that, if I have two of the same authenticates at the same level (one is optional, one isn't), the first is always taken. Is there a way to do something like this, i.e. have routes with fallthrough the request isn't handled? I'm currently using a
to do this, but it's quite a bit of overhead for something relative (at least conceptually) simple.
where I do some resolution in the
base/ function1 function2 auth1/ function3 auth2/ function4
handlers and fall through to the others if that resolution fails. I.e. do some custom routing in the
type method to do simple routing resolution based on a lambda. It's much easier to use than implementing a
Route.route(selector: suspend RoutingResolveContext.(Int) -> RouteSelectorEvaluation, body: Route.() -> Unit)
, and much more discoverable. The segment consumption API could probably be streamlined a bit if that's done, but even as is it's much nicer.