diff options
author | Colin Okay <colin@cicadas.surf> | 2022-10-27 13:13:21 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-10-27 13:13:21 -0500 |
commit | 75926d0ed50473efc106fa83231c862063d0f0c3 (patch) | |
tree | b0f2c20d47670868a7b8524c69a8ed499b64de3d /login.lisp | |
parent | fda05f8ce638987d332c8aff4043afa74e52523f (diff) |
Add: logging in with pw
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."))))))) |