summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-03-15 21:57:26 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-03-15 21:57:26 +0100
commit89e5ee140a4becefa4d4023102107727c5921efb (patch)
treeff6c9592073015dc2339fb4b7af10b921b0c321e /src
parentc9402fa350ccde6738729118323f24046569fcd1 (diff)
with-auth: Store query string in return URI.
Diffstat (limited to 'src')
-rw-r--r--src/mulk/benki/util.clj5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mulk/benki/util.clj b/src/mulk/benki/util.clj
index fa5ca77..99e739c 100644
--- a/src/mulk/benki/util.clj
+++ b/src/mulk/benki/util.clj
@@ -63,7 +63,10 @@
(defn call-with-auth [thunk]
(if *user*
(thunk)
- (do (session/flash-put! (:uri (request/ring-request)))
+ (do (session/flash-put! (str (:uri (request/ring-request))
+ (if-let [q (:query-string (request/ring-request))]
+ (str "?" q)
+ "")))
(response/redirect "/login"))))
(defmacro with-auth [& body]