Commit 5808b84e authored by Steffen van Bergerem's avatar Steffen van Bergerem

Only include at most 30 likes and reshares on pageload in the SPV

parent 6b162110
......@@ -22,8 +22,8 @@ class PostPresenter < BasePresenter
def with_initial_interactions
as_json.tap do |post|
post[:interactions].merge!(
likes: LikeService.new(current_user).find_for_post(@post.id).as_api_response(:backbone),
reshares: ReshareService.new(current_user).find_for_post(@post.id).as_api_response(:backbone)
likes: LikeService.new(current_user).find_for_post(@post.id).limit(30).as_api_response(:backbone),
reshares: ReshareService.new(current_user).find_for_post(@post.id).limit(30).as_api_response(:backbone)
)
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment