weavejester/compojure — pull request #91 by mikebroberts (2013-07-25 20:45:08+00:00)
Title: Add wrapped-routes macro

Add wrapped-routes macro as a clean way of defining a set of routes that should all use the same side-effecting middleware.

Hi James,

re: this thread on the Google group - https://groups.google.com/forum/#!topic/compojure/o5l9m7nbGlE, here's a macro that will allow middleware to only be called if a route is matched, but defined for a list of routes so that it doesn't need to be explicitly done so for each route.

This is my first attempt at writing any Clojure macro so any feedback appreciated! (e.g. I'm not 100% this macro is 'hygienic' enough)

Mike