diff options
Diffstat (limited to 'login.lisp')
-rw-r--r-- | login.lisp | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -17,5 +17,15 @@ (:p () (:a (:link "/new-account" :content "Create an account"))))) (setf (place-holder name-input) "Name" - (place-holder pw-input) "Password"))) + (place-holder pw-input) "Password") + (set-on-click + btn + (thunk* + (let ((user + (login-user (value name-input) (value pw-input)))) + (if user + (let ((session (make-session user))) + (setf (session-key (window body)) (key session) + (url (location body)) "/home")) + (alert (window body) "Error logging in."))))))) |