mirror of
https://github.com/metosin/reitit.git
synced 2026-01-05 23:39:49 +00:00
rebase-error-fix
This commit is contained in:
parent
f0a6ceb837
commit
251f547b88
2 changed files with 12 additions and 10 deletions
|
|
@ -34,9 +34,10 @@
|
|||
#?(:clj clojure.lang.Keyword
|
||||
:cljs cljs.core.Keyword)
|
||||
(into-interceptor [this data {:keys [::registry] :as opts}]
|
||||
(or (if-let [interceptor (if registry (registry this))]
|
||||
(into-interceptor interceptor data opts))
|
||||
(exception/fail!
|
||||
(if-let [interceptor (if registry (registry this))]
|
||||
(into-interceptor interceptor data opts)
|
||||
(throw
|
||||
(ex-info
|
||||
(str
|
||||
"Interceptor " this " not found in registry.\n\n"
|
||||
(if (seq registry)
|
||||
|
|
@ -44,9 +45,9 @@
|
|||
"Available interceptors in registry:\n"
|
||||
(with-out-str
|
||||
(pprint/print-table [:id :description] (for [[k v] registry] {:id k :description v}))))
|
||||
"See [reitit.interceptor/router] on how to add interceptor to the registry.\n") "\n")
|
||||
"see [reitit.interceptor/router] on how to add interceptor to the registry.\n") "\n")
|
||||
{:id this
|
||||
:registry registry})))
|
||||
:registry registry}))))
|
||||
|
||||
#?(:clj clojure.lang.APersistentVector
|
||||
:cljs cljs.core.PersistentVector)
|
||||
|
|
|
|||
|
|
@ -18,9 +18,10 @@
|
|||
#?(:clj clojure.lang.Keyword
|
||||
:cljs cljs.core.Keyword)
|
||||
(into-middleware [this data {:keys [::registry] :as opts}]
|
||||
(or (if-let [middleware (if registry (registry this))]
|
||||
(into-middleware middleware data opts))
|
||||
(exception/fail!
|
||||
(if-let [middleware (if registry (registry this))]
|
||||
(into-middleware middleware data opts)
|
||||
(throw
|
||||
(ex-info
|
||||
(str
|
||||
"Middleware " this " not found in registry.\n\n"
|
||||
(if (seq registry)
|
||||
|
|
@ -28,9 +29,9 @@
|
|||
"Available middleware in registry:\n"
|
||||
(with-out-str
|
||||
(pprint/print-table [:id :description] (for [[k v] registry] {:id k :description v}))))
|
||||
"See [reitit.middleware/router] on how to add middleware to the registry.\n") "\n")
|
||||
"see [reitit.middleware/router] on how to add middleware to the registry.\n") "\n")
|
||||
{:id this
|
||||
:registry registry})))
|
||||
:registry registry}))))
|
||||
|
||||
#?(:clj clojure.lang.APersistentVector
|
||||
:cljs cljs.core.PersistentVector)
|
||||
|
|
|
|||
Loading…
Reference in a new issue