diff options
Diffstat (limited to 'vampire.lisp')
-rw-r--r-- | vampire.lisp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vampire.lisp b/vampire.lisp index 97266d3..2e8f506 100644 --- a/vampire.lisp +++ b/vampire.lisp @@ -84,6 +84,12 @@ :directory (datastore-directory config) :subsystems (list (make-instance 'bknr.datastore:store-object-subsystem)))) +(defun redirect-to-root (body) + (setf (url (location body)) "/")) + +(defun when-logged-in? (fn) + (<?> 'session-user fn 'redirect-to-root)) + (defun start (config) (setf *config* config) (initialize-database config ) |