aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGrant Shangreaux <grant@unabridgedsoftware.com>2024-06-23 17:19:06 -0500
committerGrant Shangreaux <grant@unabridgedsoftware.com>2024-06-23 17:19:06 -0500
commitb0115ef82880db63239c6532bb3b63d86b7658cb (patch)
tree16a429c4c95fec3c0e6d4c2a60543d870494f7d9
parent68d30b9c81c4e099e0111fe0bbb33715dd572e8c (diff)
[109] Clean: use VERB.NOUN form for session endpoints
-rw-r--r--site/home.lisp2
-rw-r--r--site/login.lisp2
-rw-r--r--site/session.lisp4
3 files changed, 4 insertions, 4 deletions
diff --git a/site/home.lisp b/site/home.lisp
index 5267985..0b02e0c 100644
--- a/site/home.lisp
+++ b/site/home.lisp
@@ -9,7 +9,7 @@
(:h1 "hey " (user-name user))
(:br)
(:div
- (:form :method "POST" :action (wknd:route-to 'session.destroy)
+ (:form :method "POST" :action (wknd:route-to 'destroy.session)
(:button :type "submit" "Logout")))
(:br)
(:br)
diff --git a/site/login.lisp b/site/login.lisp
index 7d07bb2..cb1f82f 100644
--- a/site/login.lisp
+++ b/site/login.lisp
@@ -8,7 +8,7 @@
(defun login-page ()
(page (:title "V A M P I R E ~ LOGIN")
(:div (:h1 "I vant to suck your blood")
- (:form :method "POST" :action (wknd:route-to 'session.create)
+ (:form :method "POST" :action (wknd:route-to 'create.session)
(:input :placeholder "Name" :name "name")
(:br)
(:input :placeholder "Password" :type "password" :name "password")
diff --git a/site/session.lisp b/site/session.lisp
index 342d6d0..af02947 100644
--- a/site/session.lisp
+++ b/site/session.lisp
@@ -1,6 +1,6 @@
(in-package #:vampire)
-(wknd:defendpoint session.create
+(wknd:defendpoint create.session
:post :to "login"
:parameters
(name string)
@@ -20,7 +20,7 @@
(print session)
(wknd:set-cookie +session-cookie+ :value (key session))))
-(wknd:defendpoint session.destroy
+(wknd:defendpoint destroy.session
:using user-known
:post :to "logout"
:handle (do>