Remove async from Toot actions

This commit is contained in:
L. E. Segovia 2018-11-28 23:53:42 +00:00
parent 7c664b1d78
commit 95c67ca1e5
No known key found for this signature in database
GPG Key ID: D5D1DC48B52B7AD5

View File

@ -6,7 +6,7 @@ const Toot = {
state: {}, state: {},
mutations: {}, mutations: {},
actions: { actions: {
async reblog ({ state, commit, rootState }, message) { reblog ({ state, commit, rootState }, message) {
const client = new Mastodon( const client = new Mastodon(
rootState.TimelineSpace.account.accessToken, rootState.TimelineSpace.account.accessToken,
rootState.TimelineSpace.account.baseURL + '/api/v1' rootState.TimelineSpace.account.baseURL + '/api/v1'
@ -20,7 +20,7 @@ const Toot = {
return res.data.reblog return res.data.reblog
}) })
}, },
async unreblog ({ state, commit, rootState }, message) { unreblog ({ state, commit, rootState }, message) {
const client = new Mastodon( const client = new Mastodon(
rootState.TimelineSpace.account.accessToken, rootState.TimelineSpace.account.accessToken,
rootState.TimelineSpace.account.baseURL + '/api/v1' rootState.TimelineSpace.account.baseURL + '/api/v1'
@ -30,7 +30,7 @@ const Toot = {
return res.data return res.data
}) })
}, },
async addFavourite ({ state, commit, rootState }, message) { addFavourite ({ state, commit, rootState }, message) {
const client = new Mastodon( const client = new Mastodon(
rootState.TimelineSpace.account.accessToken, rootState.TimelineSpace.account.accessToken,
rootState.TimelineSpace.account.baseURL + '/api/v1' rootState.TimelineSpace.account.baseURL + '/api/v1'
@ -41,7 +41,7 @@ const Toot = {
return res.data return res.data
}) })
}, },
async removeFavourite ({ state, commit, rootState }, message) { removeFavourite ({ state, commit, rootState }, message) {
const client = new Mastodon( const client = new Mastodon(
rootState.TimelineSpace.account.accessToken, rootState.TimelineSpace.account.accessToken,
rootState.TimelineSpace.account.baseURL + '/api/v1' rootState.TimelineSpace.account.baseURL + '/api/v1'
@ -51,7 +51,7 @@ const Toot = {
return res.data return res.data
}) })
}, },
async deleteToot ({ state, commit, rootState }, message) { deleteToot ({ state, commit, rootState }, message) {
const client = new Mastodon( const client = new Mastodon(
rootState.TimelineSpace.account.accessToken, rootState.TimelineSpace.account.accessToken,
rootState.TimelineSpace.account.baseURL + '/api/v1' rootState.TimelineSpace.account.baseURL + '/api/v1'
@ -61,7 +61,7 @@ const Toot = {
return message return message
}) })
}, },
async block ({ rootState, commit }, account) { block ({ rootState, commit }, account) {
const client = new Mastodon( const client = new Mastodon(
rootState.TimelineSpace.account.accessToken, rootState.TimelineSpace.account.accessToken,
rootState.TimelineSpace.account.baseURL + '/api/v1' rootState.TimelineSpace.account.baseURL + '/api/v1'