Fork me on GitHub
#pedestal
<
2021-03-02
>
lucian30319:03:04

any idea how i would specify the order of routes when using a :linear-search router? i have three (or more routes) and want the wildcard route to execute last if no other route matches. i've tried arranging them in the set differently but the results always seem to be random as far as the order of processing and dispatch:

["/api/do" :get (conj html-interceptors `api) :route-name :api]
["/" :get (conj html-interceptors `home-page) :route-name :home]
["/*all" :get (conj html-interceptors `home-page) :route-name :documents-tree]

thumbnail22:03:35

A set has no order guarantee. Try using a vector :)