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

@ -1,2 +0,0 @@
collection @accounts
extends('api/accounts/show')

View file

@ -0,0 +1,5 @@
collection @accounts
attribute :id
node(:following) { |account| @following[account.id] || false }
node(:followed_by) { |account| @followed_by[account.id] || false }
node(:blocking) { |account| @blocking[account.id] || false }

View file

@ -8,4 +8,3 @@ node(:header) { |account| full_asset_url(account.header.url(:medium, fa
node(:followers_count) { |account| account.followers.count }
node(:following_count) { |account| account.following.count }
node(:statuses_count) { |account| account.statuses.count }
node(:following) { |account| current_account.following?(account) }