aboutsummaryrefslogtreecommitdiff
path: root/lib/state.lisp
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-09-16 08:59:41 -0500
committerColin Okay <colin@cicadas.surf>2022-09-16 08:59:41 -0500
commitb6c8013cbcd0100266f1bda436aa4075f70beee6 (patch)
treeea124354be27c9f098bbb2b64c0292b1cf53c773 /lib/state.lisp
parent19c805b4eaf8481fd627c4e6b569f2a0e28d3c3a (diff)
Add: assert-logged-in
Diffstat (limited to 'lib/state.lisp')
-rw-r--r--lib/state.lisp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/state.lisp b/lib/state.lisp
index 9a80245..37fb06f 100644
--- a/lib/state.lisp
+++ b/lib/state.lisp
@@ -39,6 +39,11 @@
(defun (setf api-token) (newvalue)
(setf (config-api-token *config*) newvalue))
+(defun assert-logged-in ()
+ "throws an error if no plausbile api token is part of the current
+ config."
+ (api-token))
+
(defun handle ()
(config-handle *config*))