No need to fetch user data using old api anymore 🎉

This commit is contained in:
taehoon 2019-03-21 21:30:30 -04:00
parent af85a3f244
commit 883a84b313

View file

@ -212,11 +212,6 @@ const users = {
},
fetchMutes (store) {
return store.rootState.api.backendInteractor.fetchMutes()
.then((mutes) => {
// fetchMutes api doesn't return full user data, let's fetch full user data using separate api calls
const promises = mutes.map(({ id }) => store.rootState.api.backendInteractor.fetchUser({ id }))
return Promise.all(promises)
})
.then((mutes) => {
store.commit('updateMutes', mutes)
store.commit('saveMuteIds', map(mutes, 'id'))