don't do separate users store just for admin stuff

This commit is contained in:
Henry Jameson 2026-06-09 13:09:39 +03:00
commit 5ecfbee434

View file

@ -1,26 +0,0 @@
import { defineStore } from 'pinia'
export const useAdminUsersStore = defineStore('adminUsers', {
state: () => ({
users: new Map()
}),
getters: {
getUser(state) {
return (id) => state.users.get(id)
},
},
actions: {
async fetchAdminUsers(opts) {
const data = await window.vuex.state.api.backendInteractor.adminListUsers({
opts,
})
data.users.forEach((user) => {
window.vuex.dispatch('fetchUserIfMissing', user.id),
this.users.set(user.id, user)
})
return data
},
},
})