Question: What is the preferred way to set default value for optional parameters?
Closed this issue · 2 comments
hden commented
It might make more sense to set it in the handler, but assuming that I'm using a handler library such as handler.sql, should we create a custom middleware for that or there is a way to specify them in the router?
weavejester commented
Ataraxy supports Clojure destructuring, so you should be able to use :or
to specify defaults. I think I'd be inclined to specify defaults in code, but I haven't given this extensive thought.
hden commented
Aha! Thanks!