Skip to content

Instantly share code, notes, and snippets.

@weavejester
Created December 10, 2012 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weavejester/4253294 to your computer and use it in GitHub Desktop.
Save weavejester/4253294 to your computer and use it in GitHub Desktop.
(defn wrap-template [handler template]
(fn [request]
(if-let [response (handler request)]
(update-in response [:body] template (select-keys request :context)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment