From 89e5ee140a4becefa4d4023102107727c5921efb Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 15 Mar 2012 21:57:26 +0100 Subject: with-auth: Store query string in return URI. --- src/mulk/benki/util.clj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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] -- cgit v1.2.3