Merge pull request #61 from yogthos/patch-1

allow custom default-handler to ring-router
This commit is contained in:
Tommi Reiman 2018-01-22 07:40:28 +02:00 committed by GitHub
commit 8db4a1d4bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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]