summaryrefslogtreecommitdiff
path: root/src/mulk/benki/util.clj
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-02-27 00:00:12 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-02-27 00:00:12 +0100
commit6bed4694e00bbfe3ff65dd00ccb45decf1321d57 (patch)
tree2e1b396a9ee840addac4ae6c5ef633724833939f /src/mulk/benki/util.clj
parent57b0f4c5bde98ca9c0824c879a449e16b8849be4 (diff)
New subsite: Book Marx.
Diffstat (limited to 'src/mulk/benki/util.clj')
-rw-r--r--src/mulk/benki/util.clj8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mulk/benki/util.clj b/src/mulk/benki/util.clj
index 5c7cd97..d61eca4 100644
--- a/src/mulk/benki/util.clj
+++ b/src/mulk/benki/util.clj
@@ -41,7 +41,10 @@
(defn link [& args]
(match [(vec args)]
- [[:wiki title & xs]] (fresolve "/wiki/~a~@[~a~]" title (first xs))))
+ [[:login]] (fresolve "/login")
+ [[:marx]] (fresolve "/marx")
+ [[:wiki title & xs]] (fresolve "/wiki/~a~@[~a~]" title (first xs))
+ ))
(defn call-with-auth [thunk]
(if (session/get :user)
@@ -51,3 +54,6 @@
(defmacro with-auth [& body]
`(call-with-auth (fn [] ~@body)))
+
+(defn redirect [x]
+ {:status 302, :headers {"Location" x}, :body ""})