Allow adding of syndication sources after a post is created

This commit is contained in:
2023-09-24 10:06:34 +10:00
parent 8b280afc75
commit 9be6389904
4 changed files with 57 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
# frozen_string_literal: true
module Admin
module Actions
module Posts
class AddSyndicationSource < Admin::Action
include Deps["commands.posts.add_syndication_source"]
def handle(req, res)
add_syndication_source.call(post_id: req.params[:id],
source_name: req.params[:syndication_source_name],
source_url: req.params[:syndication_source_url]
)
res.status = 201
res.headers["HX-Refresh"] = true
end
end
end
end
end