mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: embed topic with detailed metadata (#8062)
This commit is contained in:
@ -36,6 +36,12 @@ class EmbedController < ApplicationController
|
||||
raise Discourse::InvalidParameters.new(:embed_id) unless @embed_id =~ /^de\-[a-zA-Z0-9]+$/
|
||||
end
|
||||
|
||||
if params.has_key?(:template)
|
||||
@template = params[:template]
|
||||
else
|
||||
@template = "basic"
|
||||
end
|
||||
|
||||
list_options = build_topic_list_options
|
||||
list_options[:per_page] = params[:per_page].to_i if params.has_key?(:per_page)
|
||||
topic_query = TopicQuery.new(current_user, list_options)
|
||||
|
Reference in New Issue
Block a user