mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 05:07:53 +08:00
f2e7b74d88
When running `ensure_login_required` it should always happen prior to `check_xhr` cause check xhr will trigger a 200 response
11 lines
281 B
Ruby
11 lines
281 B
Ruby
require_dependency 'inline_oneboxer'
|
|
|
|
class InlineOneboxController < ApplicationController
|
|
prepend_before_action :check_xhr, :ensure_logged_in
|
|
|
|
def show
|
|
oneboxes = InlineOneboxer.new(params[:urls] || []).process
|
|
render json: { "inline-oneboxes" => oneboxes }
|
|
end
|
|
end
|