Standard rb

This commit is contained in:
2024-02-03 08:39:18 +11:00
parent 3346728b94
commit 2e1e38d5c1
2 changed files with 4 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ module Adamantium
expose :posts do expose :posts do
post_repo.for_rss.map do |post| post_repo.for_rss.map do |post|
post.post_type == "bookmark" ? (post.post_type == "bookmark") ?
Decorators::Bookmarks::Decorator.new(post) : Decorators::Bookmarks::Decorator.new(post) :
Decorators::Posts::Decorator.new(post) Decorators::Posts::Decorator.new(post)
end end

View File

@@ -12,9 +12,9 @@ module Admin
post = post_repo.find(id: post_id) post = post_repo.find(id: post_id)
request = if target.to_sym == :mastodon request = if target.to_sym == :mastodon
masto_id = post.syndication_sources[target].split("/").last masto_id = post.syndication_sources[target].split("/").last
mastodon.de_syndicate(post_id: masto_id) mastodon.de_syndicate(post_id: masto_id)
end end
if request.success? if request.success?
post.syndication_sources.delete(target) post.syndication_sources.delete(target)