Revamps all of the IOL's routing, so that the new history page can share with the rest.

This commit is contained in:
2023-01-12 16:56:40 -08:00
parent ce01a63797
commit 46dd191391
29 changed files with 1294 additions and 1053 deletions

View File

@@ -1,7 +1,7 @@
(ns auto-ap.client-routes)
(def routes ["/" {"" :index
"login/" :login
#"login/?" :login
"needs-activation/" :needs-activation
"needs-activation" :needs-activation
"payments/" :payments
@@ -42,3 +42,12 @@
"balance-sheet" :balance-sheet
"external" :external-ledger
"external-import" :external-import-ledger}}])
(defn all-handle-keys [routes]
(let [vals (vals routes)
result (filter keyword? vals)
deeper (filter map? vals)]
(apply concat result
(map all-handle-keys deeper))))
(def all-matches (set (all-handle-keys (second routes))))