1
0
Fork 0
forked from srxl/akkoma-fe

stop fetching user relationship when user is unauthorized

This commit is contained in:
taehoon 2019-04-17 22:47:56 -04:00
parent ed0f10e9ee
commit 992c8e1f77

View file

@ -224,8 +224,10 @@ const users = {
}) })
}, },
fetchUserRelationship (store, id) { fetchUserRelationship (store, id) {
return store.rootState.api.backendInteractor.fetchUserRelationship({ id }) if (store.state.currentUser) {
store.rootState.api.backendInteractor.fetchUserRelationship({ id })
.then((relationships) => store.commit('updateUserRelationship', relationships)) .then((relationships) => store.commit('updateUserRelationship', relationships))
}
}, },
fetchBlocks (store) { fetchBlocks (store) {
return store.rootState.api.backendInteractor.fetchBlocks() return store.rootState.api.backendInteractor.fetchBlocks()