pedestal

hlship 2019-05-31T18:35:30.015700Z

When using table syntax for routing, is there an simple/idiomatic way to remove the common prefix:

(route/expand-routes
      #{["/api/job/:job-id" :get
         (get-job client)
         :route-name ::get-job]
        ["/api/jobs" :post
         (create-job client)
         :route-name ::create-job]})
I'd like to wrap these in something that 'supplies' the /api part.

2019-06-04T13:15:58.000500Z

@hlship, you can use a different routing syntax. The terse route syntax supports hierarchical route definitions.

hlship 2019-06-04T15:24:15.002400Z

I want my cake and to eat it too. I generally prefer table syntax except for that bit of repetition.

2019-06-04T15:30:05.002600Z

Yes, I prefer table syntax as well.

ccann 2019-05-31T20:38:43.016Z

ooh, I would love that as well