From 2088b3c4dd39aa8d8b516108130d0ac0a9fd855e Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Fri, 23 Dec 2016 16:16:02 +0100 Subject: [PATCH] Add returned user to store after following. --- src/components/user_card_content/user_card_content.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue index 484597ab..18a582e7 100644 --- a/src/components/user_card_content/user_card_content.vue +++ b/src/components/user_card_content/user_card_content.vue @@ -59,8 +59,9 @@ }, methods: { followUser () { - this.$store.state.api.backendInteractor.followUser(this.user.id) - .then((x) => console.log) + const store = this.$store + store.state.api.backendInteractor.followUser(this.user.id) + .then((followedUser) => store.commit('addNewUsers', [followedUser])) } } }