0
0
Fork 0

Fix notifications in UI, added new API for fetching account relationships

This commit is contained in:
Eugen Rochko 2016-09-21 22:07:18 +02:00
parent 4bec613897
commit e46abc71ca
11 changed files with 91 additions and 17 deletions

View file

@ -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