Add returned user to store after following.

このコミットが含まれているのは:
Roger Braun 2016-12-23 16:16:02 +01:00
コミット 2088b3c4dd
1個のファイルの変更3行の追加2行の削除

ファイルの表示

@ -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]))
}
}
}