Fetch latest user statuses

This commit is contained in:
Angelina Filippova 2020-05-02 20:08:46 +03:00
parent 7cf2878eb8
commit 558db9a1c7
2 changed files with 3 additions and 3 deletions

View file

@ -72,12 +72,13 @@ const status = {
dispatch('FetchStatusesByInstance')
}
},
async FetchStatus({ commit, getters }, id) {
async FetchStatus({ commit, dispatch, getters, state }, id) {
commit('SET_LOADING', true)
const status = await fetchStatus(id, getters.authHost, getters.token)
console.log(status)
commit('SET_STATUS', status.data)
commit('SET_LOADING', false)
dispatch('FetchUserStatuses', { userId: state.fetchedStatus.account.id, godmode: false })
},
async FetchStatusesCount({ commit, getters }) {
commit('SET_LOADING', true)

View file

@ -88,7 +88,6 @@ export default {
this.$store.dispatch('NeedReboot')
this.$store.dispatch('GetNodeInfo')
this.$store.dispatch('FetchStatus', this.$route.params.id)
this.$store.dispatch('FetchUserStatuses', { userId: this.user.id, godmode: this.showPrivate })
},
methods: {
accountExists(account, key) {