about summary refs log tree commit diff
path: root/app/controllers/api
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-04 19:12:59 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-04 19:12:59 +0100
commit62292797eccc5bcf47abae9f4daaa2c186660644 (patch)
treefb324996024317abc9605015845f7467508d5d73 /app/controllers/api
parent6471a548feadf34d65fb96660f958bf808331c8f (diff)
Adding hashtag model
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/accounts_controller.rb4
-rw-r--r--app/controllers/api/v1/statuses_controller.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb
index 715b9085c..bb06ddac9 100644
--- a/app/controllers/api/v1/accounts_controller.rb
+++ b/app/controllers/api/v1/accounts_controller.rb
@@ -14,12 +14,12 @@ class Api::V1::AccountsController < ApiController
   end
 
   def following
-    @accounts = @account.following.limit(40)
+    @accounts = @account.following.with_counters.limit(40)
     render action: :index
   end
 
   def followers
-    @accounts = @account.followers.limit(40)
+    @accounts = @account.followers.with_counters.limit(40)
     render action: :index
   end
 
diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb
index a87e1528d..b05a27ef4 100644
--- a/app/controllers/api/v1/statuses_controller.rb
+++ b/app/controllers/api/v1/statuses_controller.rb
@@ -15,12 +15,12 @@ class Api::V1::StatusesController < ApiController
   end
 
   def reblogged_by
-    @accounts = @status.reblogs.includes(:account).limit(40).map(&:account)
+    @accounts = @status.reblogged_by(40)
     render action: :accounts
   end
 
   def favourited_by
-    @accounts = @status.favourites.includes(:account).limit(40).map(&:account)
+    @accounts = @status.favourited_by(40)
     render action: :accounts
   end