mirror of
https://github.com/discourse/discourse.git
synced 2025-02-19 06:02:46 +08:00

This also corrects the positioning in the chain of the check and removes misuse of prepend_before_action
11 lines
244 B
Ruby
11 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
|