Change output of api/accounts/:id/follow and unfollow to return relationship
Track relationship in redux state. Display follow/unfollow and following-back information on account view (unstyled)
This commit is contained in:
5
app/views/api/accounts/relationship.rabl
Normal file
5
app/views/api/accounts/relationship.rabl
Normal file
@ -0,0 +1,5 @@
|
||||
object @account
|
||||
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 }
|
@ -1,5 +1,2 @@
|
||||
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 }
|
||||
extends 'api/accounts/relationship'
|
||||
|
Reference in New Issue
Block a user