diff options
Diffstat (limited to 'endpoints.lisp')
-rw-r--r-- | endpoints.lisp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/endpoints.lisp b/endpoints.lisp index c9a8612..4bbc4f7 100644 --- a/endpoints.lisp +++ b/endpoints.lisp @@ -25,7 +25,7 @@ NIL if there is no session for the current request. I.e. It should be called within the scope of a request handler." (session-with-id (lzb:request-cookie +session-cookie-name+ ))) -(defmacro with-session ((player &key session (redirect "/game-room")) &body body) +(defmacro with-session ((player &key session (redirect "/tavern-door")) &body body) (let ((session (or session (gensym "SESSION")))) `(a:if-let (,session (current-session)) (let ((,player (session-player ,session))) @@ -40,7 +40,8 @@ I.e. It should be called within the scope of a request handler." (redirect-to "/tavern-door")) (defendpoint* :get "/tavern-door" () () - (a:if-let (name (flashed-value :game-room)) + "Tavern door is where the player logs into the system." + (a:if-let (name (flashed-value :tavern-door)) (doorkeeper :message (format nil "Ne'er 'erd of ye ~a" name)) (doorkeeper))) @@ -52,7 +53,7 @@ I.e. It should be called within the scope of a request handler." :path "/" :domain "localhost") ; TODO: generalize domain (redirect-to "/tavern")) (progn - (flash :game-room nick) + (flash :tavern-door nick) (redirect-to "/tavern-door")))) ) (defendpoint* :get "/register" () () |