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.@hlship, you can use a different routing syntax. The terse route syntax supports hierarchical route definitions.
I want my cake and to eat it too. I generally prefer table syntax except for that bit of repetition.
Yes, I prefer table syntax as well.
ooh, I would love that as well