Closed yayitswei closed 11 years ago
Well, I suck at Compojure :D
I'll try to fix the example.
On Sep 16, 2013, at 1:59 PM, Wei Hsu notifications@github.com wrote:
Does it work to have handlers inside a route definition? This returns a null on every request.
(defroutes easy-handler (GET "/" [] "easy"))
(defroutes hard-handler (GET "/" [] "hard"))
(defroutes awesome-routes (ANY "/easy-things" [](-> easy-handler %28wrap-ratelimit default-limit%29)) (ANY "/hard-things" [](-> hard-handler %28wrap-ratelimit %28assoc default-limit :limits [%28-> 30 limit %28wrap-limit-param :query%29 wrap-limit-user%29 %28-> 10 limit %28wrap-limit-param :query%29 wrap-limit-ip%29]%29%29))) — Reply to this email directly or view it on GitHub.
Looks like everything works when easy-handler
and hard-handler
are regular Ring functions, not Compojure routes…
Does it work to have handlers inside a route definition? This returns a null on every request.