simplify <List> API and move logic outside of it
This commit is contained in:
parent
503309890f
commit
a0d5decc49
15 changed files with 209 additions and 510 deletions
|
|
@ -61,11 +61,13 @@ const adminSettingsStorage = {
|
|||
},
|
||||
actions: {
|
||||
async fetchAdminUsers(store, opts) {
|
||||
const users = await store.rootState.api.backendInteractor.adminListUsers({
|
||||
const data = await store.rootState.api.backendInteractor.adminListUsers({
|
||||
opts,
|
||||
})
|
||||
users.forEach((user) => store.dispatch('fetchUserIfMissing', user.id))
|
||||
return users
|
||||
data.users.forEach((user) =>
|
||||
store.dispatch('fetchUserIfMissing', user.id),
|
||||
)
|
||||
return data
|
||||
},
|
||||
adminAddUserToAdminGroup(store, user) {
|
||||
store.rootState.api.backendInteractor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue