diff options
Diffstat (limited to 'lib/client.lisp')
-rw-r--r-- | lib/client.lisp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/client.lisp b/lib/client.lisp index e6324aa..527a300 100644 --- a/lib/client.lisp +++ b/lib/client.lisp @@ -319,6 +319,7 @@ running the body. If such a oneliner can be found." ;;; ACCOUNT AND INVITE STUFF (defun request-invite-code () + (assert-logged-in) (let ((invite (jonathan:parse (api:post-invite (api-token) *host*)))) @@ -338,18 +339,21 @@ running the body. If such a oneliner can be found." (config-file)))) (defun change-pw (current new repeated) + (assert-logged-in) (unless (equal new repeated) (error "The new password doesn't match the repeated value. Double check.")) (api:put-contributor/who/password (handle) new repeated current (api-token) *host*)) (defun change-signature () + (assert-logged-in) (let ((new-sig (prompt-for-signature))) - (ensure-config) - (api:put-contributor/who/signature (handle) (api-token) *host* - :%content-type "application/json" - :%body (jonathan:to-json (list :signature new-sig))) - (format t "Your signature was changed.~%"))) + (when new-sig + (ensure-config) + (api:put-contributor/who/signature (handle) (api-token) *host* + :%content-type "application/json" + :%body (jonathan:to-json (list :signature new-sig))) + (format t "Your signature was changed.~%")))) (defun show-contributor (name) |