mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-08 17:39:09 +00:00
boot: cleanup resolveStaffAccounts
This commit is contained in:
parent
6dfe3cc911
commit
a4ae956a62
1 changed files with 2 additions and 7 deletions
|
@ -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 })
|
||||
|
|
Loading…
Reference in a new issue