From 0ce959a4eb3aea3d38617c040b7efd64aed0bb35 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Fri, 25 Jul 2025 12:29:03 +0200 Subject: [PATCH] Cleanup --- frontend/src/api/accounts.js | 7 ++----- frontend/src/components/admin/domains/DomainAdminList.vue | 7 +++++-- frontend/src/components/admin/identities/IdentityList.vue | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/api/accounts.js b/frontend/src/api/accounts.js index f04404445..c04b97ce5 100644 --- a/frontend/src/api/accounts.js +++ b/frontend/src/api/accounts.js @@ -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}/`) }, diff --git a/frontend/src/components/admin/domains/DomainAdminList.vue b/frontend/src/components/admin/domains/DomainAdminList.vue index 99077af75..1e3dde671 100644 --- a/frontend/src/components/admin/domains/DomainAdminList.vue +++ b/frontend/src/components/admin/domains/DomainAdminList.vue @@ -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 diff --git a/frontend/src/components/admin/identities/IdentityList.vue b/frontend/src/components/admin/identities/IdentityList.vue index d0f358a3b..98073605c 100644 --- a/frontend/src/components/admin/identities/IdentityList.vue +++ b/frontend/src/components/admin/identities/IdentityList.vue @@ -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