aboutsummaryrefslogtreecommitdiff
path: root/lib/state.lisp
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-09-16 08:54:51 -0500
committerColin Okay <colin@cicadas.surf>2022-09-16 08:54:51 -0500
commit19c805b4eaf8481fd627c4e6b569f2a0e28d3c3a (patch)
treeb212523e1bb9fce598d3bc353b4e46a28acf17bd /lib/state.lisp
parent05d14a41be09840477477e4d7142951f06dce0a4 (diff)
Fix: check for empty string token
Diffstat (limited to 'lib/state.lisp')
-rw-r--r--lib/state.lisp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/state.lisp b/lib/state.lisp
index 7a372e3..9a80245 100644
--- a/lib/state.lisp
+++ b/lib/state.lisp
@@ -31,9 +31,10 @@
"Holds a config struct instance.")
(defun api-token ()
- (a:if-let (token (config-api-token *config*))
- token
- (error () "No API TOKEN")))
+ (let ((token (config-api-token *config*)))
+ (unless (and token (plusp (length token)))
+ (error () "No API TOKEN"))
+ token))
(defun (setf api-token) (newvalue)
(setf (config-api-token *config*) newvalue))