Improve 404 and add broken link static page on viewer.

This commit is contained in:
Andrey Antukh 2021-09-08 12:39:16 +02:00 committed by Andrés Moya
parent 15991d0226
commit 85a1c61880
7 changed files with 89 additions and 73 deletions

View file

@ -42,10 +42,13 @@
(if-let [conform (get-in match [:data :conform])]
(let [spath (get conform :path-params ::any)
squery (get conform :query-params ::any)]
(-> (dissoc match :params)
(assoc :path-params (us/conform spath (get match :path-params))
:query-params (us/conform squery (get match :query-params)))))
match)))
(try
(-> (dissoc match :params)
(assoc :path-params (us/conform spath (get match :path-params))
:query-params (us/conform squery (get match :query-params))))
(catch :default _
nil)))
match)))
(defn on-navigate
[router path]