From 19c805b4eaf8481fd627c4e6b569f2a0e28d3c3a Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Fri, 16 Sep 2022 08:54:51 -0500 Subject: Fix: check for empty string token --- lib/state.lisp | 7 ++++--- 1 file 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)) -- cgit v1.2.3