Syndicate to Day One from Admin pages
This commit is contained in:
15
slices/admin/actions/posts/show.rb
Normal file
15
slices/admin/actions/posts/show.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
module Actions
|
||||
module Posts
|
||||
class Show < Admin::Action
|
||||
include Deps["views.posts.show"]
|
||||
|
||||
def handle(req, res)
|
||||
res.render show, id: req.params[:id]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
15
slices/admin/actions/posts/syndicate.rb
Normal file
15
slices/admin/actions/posts/syndicate.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
module Actions
|
||||
module Posts
|
||||
class Syndicate < Admin::Action
|
||||
include Deps["commands.posts.syndicate"]
|
||||
|
||||
def handle(req, res)
|
||||
syndicate.(post_id: req.params[:id], target: req.params[:target])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user