fix follow

This commit is contained in:
Shpuld Shpuldson 2020-04-22 15:06:10 +03:00
parent 576ad9750b
commit aa56147322
2 changed files with 13 additions and 13 deletions

View file

@ -37,16 +37,16 @@ export default {
},
follow () {
this.inProgress = true
requestFollow(this.user, this.$store).then(() => {
requestFollow(this.relationship.id, this.$store).then(() => {
this.inProgress = false
})
},
unfollow () {
const store = this.$store
this.inProgress = true
requestUnfollow(this.user, store).then(() => {
requestUnfollow(this.relationship.id, store).then(() => {
this.inProgress = false
store.commit('removeStatus', { timeline: 'friends', userId: this.user.id })
store.commit('removeStatus', { timeline: 'friends', userId: this.relationship.id })
})
}
}