mirror of
https://github.com/metosin/reitit.git
synced 2026-02-21 01:29:09 +00:00
interceptors, wip
This commit is contained in:
parent
9f324606ff
commit
2092682d6a
1 changed files with 17 additions and 16 deletions
|
|
@ -116,6 +116,7 @@
|
||||||
:interceptors))
|
:interceptors))
|
||||||
{::router router}))
|
{::router router}))
|
||||||
|
|
||||||
|
(comment
|
||||||
(defn execute [r {{:keys [uri]} :request :as ctx}]
|
(defn execute [r {{:keys [uri]} :request :as ctx}]
|
||||||
(if-let [interceptors (-> (r/match-by-path r uri)
|
(if-let [interceptors (-> (r/match-by-path r uri)
|
||||||
:result
|
:result
|
||||||
|
|
@ -133,4 +134,4 @@
|
||||||
(assoc ctx :leave true))}]}
|
(assoc ctx :leave true))}]}
|
||||||
["/ping" (fn [ctx] (assoc ctx :response "ok"))]]))
|
["/ping" (fn [ctx] (assoc ctx :response "ok"))]]))
|
||||||
|
|
||||||
(execute r {:request {:uri "/api/ping"}})
|
(execute r {:request {:uri "/api/ping"}}))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue