aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-06-19 13:13:42 -0700
committercolin <colin@cicadas.surf>2024-06-19 13:13:42 -0700
commitce470567c4421da7d073685cf845fdc4448aadc0 (patch)
treebdf44e468a55741b26e62ada9d309d28173abb4d
parent9dbf54efdf2a62565333e58d63bcbfb804ab9442 (diff)
Rename classes with convention
-rw-r--r--site/home.lisp2
-rw-r--r--site/invites.lisp8
-rw-r--r--site/login.lisp4
3 files changed, 7 insertions, 7 deletions
diff --git a/site/home.lisp b/site/home.lisp
index c8fe9d1..47d0f17 100644
--- a/site/home.lisp
+++ b/site/home.lisp
@@ -9,7 +9,7 @@
(:h1 "hey " (user-name user))
(:br)
(:div
- (:form :method "POST" :action "/invites"
+ (:form :method "POST" :action (wknd:route-to 'create.invite)
(:p "Initiate an invitation...")
(:button :type "submit" "Bite Someone")))
(:br)
diff --git a/site/invites.lisp b/site/invites.lisp
index dc1f31c..dab6a1b 100644
--- a/site/invites.lisp
+++ b/site/invites.lisp
@@ -1,6 +1,6 @@
(in-package #:vampire)
-(wknd:defendpoint invites
+(wknd:defendpoint create.invite
:using user-known
:post :to "invites"
:handle
@@ -14,7 +14,7 @@
(or (plusp uses) (null uses))))
-(wknd:defendpoint create-new-account
+(wknd:defendpoint create.user
:post :to "new-account"
:parameters
(username string)
@@ -26,7 +26,7 @@
:authenticate (and
(equal password password2)
(setf invite (object-with-key invite-code)))
- :authorize (invite-validp invite)
+ :authorize (invite-valid-p invite)
:handle (progn
(db:with-transaction ()
(when (uses-remaining invite)
@@ -44,7 +44,7 @@
(defun new-account-page ()
(page (:title "V A M P I R E ~ JOIN")
- (:form :method "POST" :action (wknd:route-to 'create-new-account)
+ (:form :method "POST" :action (wknd:route-to 'create.user)
(:input :placeholder "Invite Code" :name "invite-code")(:br)
(:input :placeholder "Username" :name "username")(:br)
(:input :placeholder "Password" :name "password" :type "password")(:br)
diff --git a/site/login.lisp b/site/login.lisp
index 3f7e8fa..d859e0d 100644
--- a/site/login.lisp
+++ b/site/login.lisp
@@ -5,7 +5,7 @@
:returns "text/html"
:handle (login-page))
-(wknd:defendpoint login-user
+(wknd:defendpoint login.user
:post :route "login"
:parameters
(name string)
@@ -26,7 +26,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 'login-user)
+ (:form :method "POST" :action (wknd:route-to 'login.user)
(:input :placeholder "Name" :name "name")
(:br)
(:input :placeholder "Password" :type "password" :name "password")