Last active
August 29, 2015 14:12
-
-
Save dustingetz/15a5eda645df9694fea7 to your computer and use it in GitHub Desktop.
Pedestal dynamic routes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn questions-get [req] | |
(api/collection-read ::questions-get | |
'[:find ?e :where [?e :Question/text]] | |
question/typeinfo)) | |
(defn mk-handlers [] | |
`{:get questions-get}) | |
(def routes | |
(expand-routes | |
`[[["/api" {:get api/index} | |
^:interceptors [(body-params/body-params) | |
pedestal-util/auto-content-type | |
pedestal-util/combine-body-params] | |
["/questions" ~(mk-handlers)] | |
]]])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment