mirror of
https://github.com/metosin/reitit.git
synced 2025-12-18 00:41:12 +00:00
Tighten middleware spec from collection to vector
This avoids messing up the order of middleware chain accidentally.
This commit is contained in:
parent
4a199b918a
commit
69795f5fe7
2 changed files with 2 additions and 2 deletions
|
|
@ -8,7 +8,7 @@
|
|||
;; Specs
|
||||
;;
|
||||
|
||||
(s/def ::middleware (s/coll-of #(satisfies? middleware/IntoMiddleware %)))
|
||||
(s/def ::middleware (s/coll-of #(satisfies? middleware/IntoMiddleware %) :kind vector?))
|
||||
(s/def ::get map?)
|
||||
(s/def ::head map?)
|
||||
(s/def ::post map?)
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@
|
|||
(testing "middleware cannot be a list"
|
||||
(is (thrown-with-msg?
|
||||
ExceptionInfo
|
||||
#":reitit.ring.spec/invalid-specs"
|
||||
#"Invalid route data"
|
||||
(ring/router
|
||||
["/api" {:handler identity
|
||||
:middleware '()}]
|
||||
|
|
|
|||
Loading…
Reference in a new issue