boot: cleanup resolveStaffAccounts

This commit is contained in:
Ariadne Conill 2019-11-09 00:34:05 -06:00
parent 6dfe3cc911
commit a4ae956a62

View file

@ -185,14 +185,9 @@ const getAppSecret = async ({ store }) => {
}
const resolveStaffAccounts = async ({ store, accounts }) => {
let nicknames = accounts.map(uri => uri.split('/').pop())
const backendInteractor = store.state.api.backendInteractor
nicknames = nicknames.map(id => {
console.log('resolving staff account:', id)
return backendInteractor.fetchUser({ id })
})
let nicknames = accounts.map(uri => uri.split('/').pop())
.map(id => backendInteractor.fetchUser({ id }))
nicknames = await Promise.all(nicknames)
store.dispatch('setInstanceOption', { name: 'staffAccounts', value: nicknames })