aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2022-03-24 17:12:48 -0500
committerColin Okay <okay@toyful.space>2022-03-24 17:12:48 -0500
commit5e18f28cb59154410d4177f75dfbf24382726a24 (patch)
treeab4a7d121fb9677e45a5bcff42adcc2da96e58e2
parent33e54da2d7c5a012650322d10477154b6a91ba1e (diff)
[bugfix] edited oneliners end up in the local cache
-rw-r--r--lib/client.lisp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/client.lisp b/lib/client.lisp
index 61c3130..b39e0ac 100644
--- a/lib/client.lisp
+++ b/lib/client.lisp
@@ -280,8 +280,11 @@ running the body. If such a oneliner can be found."
(api:request-with
(: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.
+ (let ((updated
+ (jonathan:parse
+ (api:patch--oneliner-entry-edit (oneliner-id ol) :token (api-token)))))
+ (merge-oneliners (list updated)))
+
(format t "Edits accepted~%")))))))
;;TODO: need to sync cache here.