From dbb73dc43057729bcd84e446c8c25e0f23b6d2a1 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sat, 24 Feb 2024 16:54:41 +1100 Subject: [PATCH] Return successes from update command --- slices/micropub/commands/posts/update.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/slices/micropub/commands/posts/update.rb b/slices/micropub/commands/posts/update.rb index aaaa7d8..7ed6909 100644 --- a/slices/micropub/commands/posts/update.rb +++ b/slices/micropub/commands/posts/update.rb @@ -24,6 +24,8 @@ module Micropub attrs_to_replace[:content] = markdown.call(content: content) if content post_repo.update(post.id, attrs_to_replace) + + Success() end if params.key? :add @@ -45,6 +47,8 @@ module Micropub post_repo.tag_post(post_id: post.id, tags: tags) if tags && !tags.empty? add_syndication_source.call(post.id, "", syndication) if syndication && !syndication.empty? + + Success() end if params.key? :delete @@ -67,6 +71,8 @@ module Micropub post_repo.update(post.id, attrs) unless attrs.empty? end + + Success() end end end