discourse/app/controllers/inline_onebox_controller.rb

Failed to ignore revisions in .git-blame-ignore-revs.

18 lines
403 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class InlineOneboxController < ApplicationController
requires_login
def show
2018-11-12 16:09:20 -05:00
hijack do
oneboxes = InlineOneboxer.new(
params[:urls] || [],
user_id: current_user.id,
category_id: params[:category_id].to_i,
topic_id: params[:topic_id].to_i
).process
2018-11-12 16:09:20 -05:00
render json: { "inline-oneboxes" => oneboxes }
end
end
end