about summary refs log tree commit diff
path: root/app/controllers/api
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-29 01:29:19 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-29 01:29:19 +0200
commite0a197650a30bec9dae26d714168700bc9ce93ed (patch)
tree5f590c5b2f393734be7aea5e19c1ecaa8c85857f /app/controllers/api
parentc913bdfc98baab25a78866d5d2b0f0c33e017afa (diff)
Adding common followers API, fixing fallback query again
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/accounts_controller.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb
index bb3e54a89..a74d6f979 100644
--- a/app/controllers/api/v1/accounts_controller.rb
+++ b/app/controllers/api/v1/accounts_controller.rb
@@ -14,15 +14,23 @@ class Api::V1::AccountsController < ApiController
   end
 
   def following
-    @following = @account.following
+    @accounts = @account.following
+    render action: :index
   end
 
   def followers
-    @followers = @account.followers
+    @accounts = @account.followers
+    render action: :index
+  end
+
+  def common_followers
+    @accounts = @account.common_followers_with(current_user.account)
+    render action: :index
   end
 
   def suggestions
     @accounts = FollowSuggestion.get(current_user.account_id)
+    render action: :index
   end
 
   def statuses