FEATURE: ?include_raw parameter for /t/id/posts.json
include_raw is not added for the wordpress view because it uses the BasicPostSerializer, and is not a one-line change. This is the only use of the TopicViewPostsSerializer class, and the previous change covered the only use of the TopicViewSerializer class. No other locations include the PostStreamSerializerMixin. Therefore, this feature is most likely complete.
This commit is contained in:
parent
067f552cd5
commit
d7a4e39e1d
|
@ -110,7 +110,7 @@ class TopicsController < ApplicationController
|
||||||
params.require(:post_ids)
|
params.require(:post_ids)
|
||||||
|
|
||||||
@topic_view = TopicView.new(params[:topic_id], current_user, post_ids: params[:post_ids])
|
@topic_view = TopicView.new(params[:topic_id], current_user, post_ids: params[:post_ids])
|
||||||
render_json_dump(TopicViewPostsSerializer.new(@topic_view, scope: guardian, root: false))
|
render_json_dump(TopicViewPostsSerializer.new(@topic_view, scope: guardian, root: false, include_raw: !!params[:include_raw]))
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy_timings
|
def destroy_timings
|
||||||
|
|
Loading…
Reference in New Issue