From 0fbf73d77b814f649323c48dc8c71d2f8f0769fc Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Mon, 8 Aug 2022 08:25:09 -0500 Subject: [fix] draft deletion after publication --- lib/client.lisp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lib/client.lisp') diff --git a/lib/client.lisp b/lib/client.lisp index 13bf2fe..9f92c6e 100644 --- a/lib/client.lisp +++ b/lib/client.lisp @@ -269,13 +269,12 @@ running the body. If such a oneliner can be found." (:body (oneliner-to-json-body ol) :content-type "application/json") (let ((updated - (if (oneliner-id ol) - (api:patch--oneliner-entry-edit (oneliner-id ol) :token (api-token)) - (api:post--oneliner :token (api-token))))) - (merge-oneliners (list updated))) - ;; if that worked, no http error occured, so this next part will run - (drop-draft name) - (format t "Draft ~a published and removed from drafts.~%" name)))) + (jonathan:parse (if (oneliner-id ol) + (api:patch--oneliner-entry-edit (oneliner-id ol) :token (api-token)) + (api:post--oneliner :token (api-token)))))) + (merge-oneliners (list updated)) + (drop-draft name) + (format t "Draft ~a published and removed from drafts.~%" name))))) ;;; ADMIN OF ONELINER ENTRIES -- cgit v1.2.3