This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-02
Channels
- # announcements (21)
- # babashka (1)
- # beginners (67)
- # calva (18)
- # cider (21)
- # clj-kondo (109)
- # cljs-dev (3)
- # clojure (129)
- # clojure-spec (15)
- # clojure-uk (30)
- # clojurescript (3)
- # datomic (2)
- # graalvm (8)
- # graphql (1)
- # juxt (1)
- # malli (28)
- # off-topic (46)
- # reitit (5)
- # rewrite-clj (33)
- # ring-swagger (2)
- # shadow-cljs (199)
- # vim (9)
Hey Folks, Having a bit of trouble understanding the way that guarded routes work in bidi and I couldn't find any examples in the tests that would help me. Here's what I've got at the moment....
(def foo-routes
["/"
[[:get [[["foos"] :get-foos]]]
[:post [[["foos"] :post-foo]]]
[:delete [[["foos"] :delete-foo]]]]])
This seems like it might be right since I can do...
(let [routes foo-routes]
(bidi/path-for routes :post-foo))
=> "/foos"
However, if I then do
(bidi/match-route foo-routes "/foos")
I get nil
. Adding :method :get
to the call to match-route doesn't help as I thought it might.