0
0
Fork 0

Integrating block relationships into the API (read-only for now)

This commit is contained in:
Eugen Rochko 2016-10-03 17:16:58 +02:00
parent 9d59d7b463
commit 2c9e672ee2
2 changed files with 15 additions and 2 deletions

View file

@ -40,7 +40,7 @@ class Api::V1::AccountsController < ApiController
@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 = {}
@blocking = Account.blocking_map(ids, current_user.account_id)
end
private
@ -52,6 +52,6 @@ class Api::V1::AccountsController < ApiController
def set_relationship
@following = Account.following_map([@account.id], current_user.account_id)
@followed_by = Account.followed_by_map([@account.id], current_user.account_id)
@blocking = {}
@blocking = Account.blocking_map([@account.id], current_user.account_id)
end
end