Return successes from update command
This commit is contained in:
@@ -24,6 +24,8 @@ module Micropub
|
|||||||
attrs_to_replace[:content] = markdown.call(content: content) if content
|
attrs_to_replace[:content] = markdown.call(content: content) if content
|
||||||
|
|
||||||
post_repo.update(post.id, attrs_to_replace)
|
post_repo.update(post.id, attrs_to_replace)
|
||||||
|
|
||||||
|
Success()
|
||||||
end
|
end
|
||||||
|
|
||||||
if params.key? :add
|
if params.key? :add
|
||||||
@@ -45,6 +47,8 @@ module Micropub
|
|||||||
|
|
||||||
post_repo.tag_post(post_id: post.id, tags: tags) if tags && !tags.empty?
|
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?
|
add_syndication_source.call(post.id, "", syndication) if syndication && !syndication.empty?
|
||||||
|
|
||||||
|
Success()
|
||||||
end
|
end
|
||||||
|
|
||||||
if params.key? :delete
|
if params.key? :delete
|
||||||
@@ -67,6 +71,8 @@ module Micropub
|
|||||||
|
|
||||||
post_repo.update(post.id, attrs) unless attrs.empty?
|
post_repo.update(post.id, attrs) unless attrs.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Success()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user