2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-04 08:47:37 +08:00
discourse/app/controllers/inline_onebox_controller.rb
Sam 41986cdb2f Refactor requires login logic, reduce duplicate code
This also corrects the positioning in the chain of the check
and removes misuse of prepend_before_action
2018-02-01 15:17:59 +11:00

10 lines
244 B
Ruby

require_dependency 'inline_oneboxer'
class InlineOneboxController < ApplicationController
requires_login
def show
oneboxes = InlineOneboxer.new(params[:urls] || []).process
render json: { "inline-oneboxes" => oneboxes }
end
end