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:
Eugen Rochko
2016-09-23 20:23:26 +02:00
parent c6d893a71d
commit 3f9708edc4
9 changed files with 121 additions and 32 deletions

View File

@ -124,10 +124,10 @@ export function followAccountRequest(id) {
};
};
export function followAccountSuccess(account) {
export function followAccountSuccess(relationship) {
return {
type: ACCOUNT_FOLLOW_SUCCESS,
account: account
relationship: relationship
};
};
@ -145,10 +145,10 @@ export function unfollowAccountRequest(id) {
};
};
export function unfollowAccountSuccess(account) {
export function unfollowAccountSuccess(relationship) {
return {
type: ACCOUNT_UNFOLLOW_SUCCESS,
account: account
relationship: relationship
};
};