This commit is contained in:
Antoine Nguyen
2025-07-25 12:29:03 +02:00
parent e587533cd5
commit 0ce959a4eb
3 changed files with 8 additions and 8 deletions
+2 -5
View File
@@ -3,17 +3,14 @@ import repository from './repository'
const resource = 'accounts'
export default {
getAll({ domain, role }) {
getAll(params) {
return repository.get(`/${resource}/`, {
params: { domain, role },
params,
paramsSerializer: {
indexes: null,
},
})
},
getAllParams(params) {
return repository.get(`${resource}/`, { params })
},
get(accountId) {
return repository.get(`${resource}/${accountId}/`)
},
@@ -130,9 +130,12 @@ function fetchAdministrators(domain) {
function fetchAccounts() {
accountApi
.getAll({ role: [constants.RESELLER, constants.DOMAIN_ADMIN] })
.getAll({
role: [constants.RESELLER, constants.DOMAIN_ADMIN],
page_size: 50,
})
.then((resp) => {
accounts.value = resp.data.filter(
accounts.value = resp.data.results.filter(
(account) =>
administrators.value.find((admin) => admin.id === account.pk) ===
undefined
@@ -329,7 +329,7 @@ async function fetchIdentities() {
try {
const resp =
identityType.value === 'account'
? await accountsApi.getAllParams(params)
? await accountsApi.getAll(params)
: await aliasesApi.getAll(params)
identities.value = resp.data.results
totalIdentities.value = resp.data.count