Commit a4ae956a authored by kaniini's avatar kaniini

boot: cleanup resolveStaffAccounts

parent 6dfe3cc9
Pipeline #19795 passed with stages
in 3 minutes and 51 seconds
...@@ -185,14 +185,9 @@ const getAppSecret = async ({ store }) => { ...@@ -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 })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment