Add returned user to store after following.

This commit is contained in:
Roger Braun 2016-12-23 16:16:02 +01:00
parent fc268c48bc
commit 2088b3c4dd

View file

@ -59,8 +59,9 @@
}, },
methods: { methods: {
followUser () { followUser () {
this.$store.state.api.backendInteractor.followUser(this.user.id) const store = this.$store
.then((x) => console.log) store.state.api.backendInteractor.followUser(this.user.id)
.then((followedUser) => store.commit('addNewUsers', [followedUser]))
} }
} }
} }