diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/api/accounts_controller.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/api/accounts_controller.rb b/app/controllers/api/accounts_controller.rb index 1a19ae43e..ccbbc93ff 100644 --- a/app/controllers/api/accounts_controller.rb +++ b/app/controllers/api/accounts_controller.rb @@ -28,6 +28,14 @@ class Api::AccountsController < ApiController render action: :show end + def relationships + ids = params[:id].is_a?(Enumerable) ? params[:id].map { |id| id.to_i } : [params[:id].to_i] + @accounts = Account.find(ids) + @following = Account.following_map(ids, current_user.account_id) + @followed_by = Account.followed_by_map(ids, current_user.account_id) + @blocking = {} + end + private def set_account |