diff options
author | Colin Okay <colin@cicadas.surf> | 2022-08-08 08:25:09 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-08-08 08:25:09 -0500 |
commit | 0fbf73d77b814f649323c48dc8c71d2f8f0769fc (patch) | |
tree | 61b263d6c67f9195ab9721d491b80de377fd7e3c | |
parent | 1fa17ffd12279c98bb4e65565a619f032c2cac94 (diff) |
[fix] draft deletion after publication
-rw-r--r-- | lib/client.lisp | 13 |
1 files changed, 6 insertions, 7 deletions
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 |