Merge pull request #754 from amyspark/fix-undoing-retoots

Fix undoing retoots/favourites
This commit is contained in:
AkiraFukushima 2018-11-30 08:14:09 +09:00 committed by GitHub
commit 8207d678cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,9 @@ const Toot = {
rootState.TimelineSpace.account.baseURL + '/api/v1'
)
return client.post(`/statuses/${message.id}/unreblog`)
.then(res => {
return res.data
})
},
addFavourite ({ state, commit, rootState }, message) {
const client = new Mastodon(
@ -44,6 +47,9 @@ const Toot = {
rootState.TimelineSpace.account.baseURL + '/api/v1'
)
return client.post(`/statuses/${message.id}/unfavourite`)
.then(res => {
return res.data
})
},
deleteToot ({ state, commit, rootState }, message) {
const client = new Mastodon(