diff options
author | Colin Okay <okay@toyful.space> | 2022-03-13 14:24:16 -0500 |
---|---|---|
committer | Colin Okay <okay@toyful.space> | 2022-03-13 14:24:16 -0500 |
commit | 5531288c433641d81d1359e0afa69f86d4bf5d07 (patch) | |
tree | 053d048c9c4ef71136cd4bdb2dd5af30bf516d92 /lib | |
parent | 7bcf634c789c00a95237ad74e5f923a4214020c8 (diff) |
can also edit drafts
Diffstat (limited to 'lib')
-rw-r--r-- | lib/client.lisp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/client.lisp b/lib/client.lisp index a72b991..6883b20 100644 --- a/lib/client.lisp +++ b/lib/client.lisp @@ -195,11 +195,9 @@ running the body. If such a oneliner can be found." ;;; EDITING ONELINERS -(defun edit-item (ident) +(defun edit-item (ident &optional draftp) (api-token) ;; fails with error if not set. - (when-oneliner (ol ident) - ;; Like adding a oneliner, read each field in from a prompt. - ;; Here, prefil the field with its current value. + (let ((ol (if draftp (fetch-draft ident) (the-oneliner ident)))) (let* ((oneliner-string (prompt "Oneliner: " :expect 'valid-oneliner-string-p @@ -270,7 +268,7 @@ running the body. If such a oneliner can be found." (:body (oneliner-to-json-body local) :content-type "application/json") (api:patch--oneliner-entry-edit (oneliner-id ol) :token (api-token)) - ;(merge-oneliners (list new-item)) ;;TODO: this is broken, wait for API update. + ;(merge-oneliners (list new-item)) ;;TODO: this is broken, wait for API update. (format t "Edits accepted~%"))))))) (defun publish-draft (name) |