Use lookup endpoint to obtain users by nickname

This commit is contained in:
Tusooa Zhu 2022-08-09 22:11:55 -04:00
commit 09f9640be1
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
3 changed files with 38 additions and 5 deletions

View file

@ -285,6 +285,13 @@ const users = {
return user
})
},
fetchUserByName (store, name) {
return store.rootState.api.backendInteractor.fetchUserByName({ name })
.then((user) => {
store.commit('addNewUsers', [user])
return user
})
},
fetchUserRelationship (store, id) {
if (store.state.currentUser) {
store.rootState.api.backendInteractor.fetchUserRelationship({ id })