aboutsummaryrefslogtreecommitdiff
path: root/lib/state.lisp
diff options
context:
space:
mode:
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))