mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
added best=N option to get N best comment on a post
This commit is contained in:
@ -71,7 +71,7 @@ class PostsController < ApplicationController
|
||||
post_serializer.draft_sequence = DraftSequence.current(current_user, post.topic.draft_key)
|
||||
link_counts = TopicLinkClick.counts_for(post.topic, [post])
|
||||
post_serializer.single_post_link_counts = link_counts[post.id] if link_counts.present?
|
||||
|
||||
post_serializer.topic_slug = post.topic.slug if post.topic.present?
|
||||
|
||||
result = {post: post_serializer.as_json}
|
||||
if revisor.category_changed.present?
|
||||
|
Reference in New Issue
Block a user