How do you get a path-param out of a Reitit backend Clojure route? I am trying to get the val associated with :id
in the following manner, but keep getting a 404 file not found error in the REPL.
["/foo/:id" {:get
(fn [{:keys [path-params ]}]
(some-ns/some-fn (:id path-params)))}]
I have tried using the documentation at https://luminusweb.com/docs/routes.html and https://github.com/metosin/reitit/blob/master/README.md.
Destructure the path params from the request, and then extract the id.
Documentation and examples obtained from https://github.com/luminus-framework/luminus-docs/blob/master/resources/md/sessions_cookies.md. Controllers were used, as documented by https://clojureverse.org/t/how-do-you-accomplish-spa-re-frame-teardown/5516/6.