Hi list,
Am I right that, with the table routes, it's impossible to set up "fallback routes"?
For example, given the table routes below:
#{
["/echo/*path"
:get [http/json-body `echo]
:route-name :echo]
["/0/*path"
:get [http/json-body `echo]
:route-name :0]
["/*path"
:get [`home]
:route-name :home]
}
My intention is that all unmatched routes would go to the :home route.
However it doesn't work as I expected. For example, given the path "/0/foo", I assume it would match against the route :0, but pedestal would choose the :home route. I can see it's because the table routes is a Set so it's unordered, but that's really counter-intuitive. I tried to specify ":router :linear-search", but with no luck either.
Seems the only to achieve my goal is to use the :linear-search router with the terse routes.
Best,
Shuai