Fork me on GitHub
#pedestal
<
2019-07-20
>
stacktracer20:07:50

In Pedestal examples, the keywords used for path-params are always non-namespaced (e.g. "/users/:id/posts/:post"). Is it possible to use namespaced keywords (e.g. "/users/::id/posts/::post")? If it's possible, is it desirable?

souenzzo14:07:29

i think that #reitit has a "custom DSL" that allows it.

Daouda21:07:19

Hey Folks, I’m using a pedestal service and defining my routes this way:

(def routes
  #{["/" :get (conj common-interceptors `home-page)]
    ["/about" :get (conj common-interceptors `about-page)]
    ["/locaux" :post (conj common-interceptors `create-user)]})
But i would to have it in this format:
(def routes
  #{["/" ^:interceptors [common-interceptors]
     ["/api"
      ["/home" :get `home-page]
      ["/about" :get `about-page]
      ["/locaux" :post `create-user]]]})
So far not success. Need your help guys 😄