i want a catch all route that captures the path as a param
but I already have something like this in my router:
scope "/:language", MyWeb do
pipe_through [...]
live_session :language, on_mount: MyWeb.Hooks.DoIt do
live "/", IndexLive.Index, :index
live "/thing/*rest_of_stuff", ThingLive.Index, :index
end
end
so if I add something like this at the bottom of the router
scope "/", MyWeb do
pipe_through [...]
live_session :other, on_mount: MyWeb.Hooks.DoIt do
live "/*rest_of_stuff", ThingLive.Index, :index
end
end
it only works if the path is like /some/thing
and obviously routes through the /:language
scope if the path is like /something
. I guess what i would like to do is check the params when it routes through the :language
scope and hits "/"
and based on some criteria kick it out of the :language
scope if conditions aren’t met so that it continues down the router and ultimately the /*rest_of_stuff
route gets hit. is there a way to do this?