Files
adamantium/slices/admin/actions/posts/create_highlight.rb
2024-04-05 21:35:39 +11:00

18 lines
376 B
Ruby

# frozen_string_literal: true
module Admin
module Actions
module Posts
class CreateHighlight < Admin::Action
include Deps["commands.highlight.create"]
def handle(req, res)
create.call(post_id: req.params[:id], text: req.params[:text])
res.redirect_to "/admin/posts/#{req.params[:id]}"
end
end
end
end
end