mirror of
https://github.com/metosin/reitit.git
synced 2025-12-23 18:41:11 +00:00
Merge pull request #61 from yogthos/patch-1
allow custom default-handler to ring-router
This commit is contained in:
commit
8db4a1d4bf
1 changed files with 3 additions and 2 deletions
|
|
@ -18,8 +18,9 @@
|
|||
(defn ring-handler
|
||||
"Creates a ring-handler out of a ring-router.
|
||||
Supports both 1 (sync) and 3 (async) arities."
|
||||
[router]
|
||||
(let [default-handler (constantly nil)]
|
||||
([router]
|
||||
(ring-handler router (constantly nil)))
|
||||
([router default-handler]
|
||||
(with-meta
|
||||
(fn
|
||||
([request]
|
||||
|
|
|
|||
Loading…
Reference in a new issue