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 }) => { const resolveStaffAccounts = async ({ store, accounts }) => {
let nicknames = accounts.map(uri => uri.split('/').pop())
const backendInteractor = store.state.api.backendInteractor const backendInteractor = store.state.api.backendInteractor
let nicknames = accounts.map(uri => uri.split('/').pop())
nicknames = nicknames.map(id => { .map(id => backendInteractor.fetchUser({ id }))
console.log('resolving staff account:', id)
return backendInteractor.fetchUser({ id })
})
nicknames = await Promise.all(nicknames) nicknames = await Promise.all(nicknames)
store.dispatch('setInstanceOption', { name: 'staffAccounts', value: nicknames }) store.dispatch('setInstanceOption', { name: 'staffAccounts', value: nicknames })