summaryrefslogtreecommitdiff
path: root/src/mulk/benki/util.clj
diff options
context:
space:
mode:
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 ""})