discourse/app/controllers/inline_onebox_controller.rb

11 lines
261 B
Ruby
Raw Normal View History

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