Permalink
Browse files

Added wrap-flash middleware to compojure.handler/site function

  • Loading branch information...
1 parent 28e5115 commit bdf350c40258916f8169aa1e2982d8db960ad3cf @weavejester committed Nov 20, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/compojure/handler.clj
@@ -5,7 +5,8 @@
nested-params
multipart-params
cookies
- session]))
+ session
+ flash]))
(defn- with-opts [routes middleware opts]
(if opts
@@ -28,6 +29,7 @@
"Create a handler suitable for a standard website. This adds the
following middleware to your routes:
- wrap-session
+ - wrap-flash
- wrap-cookies
- wrap-multipart-params
- wrap-params
@@ -40,4 +42,5 @@
[routes & [opts]]
(-> (api routes)
(with-opts wrap-multipart-params (:multipart opts))
+ (wrap-flash)
(with-opts wrap-session (:session opts))))

0 comments on commit bdf350c

Please sign in to comment.