diff --git a/src/stores/user/index.ts b/src/stores/user/index.ts index 873e958f..d685b918 100644 --- a/src/stores/user/index.ts +++ b/src/stores/user/index.ts @@ -206,6 +206,7 @@ const useUserStore = defineStore('api-user', () => { includeBranch?: boolean; userType?: string; status?: Status; + responsibleDistrictId?: string; }, flow?: { sessionId?: string; @@ -213,30 +214,7 @@ const useUserStore = defineStore('api-user', () => { transactionId?: string; }, ) { - const params = new URLSearchParams(); - - if (opts?.pageSize && opts?.pageSize > 0) { - params.append('pageSize', `${opts.pageSize}`); - } - if (opts?.page && opts.page > 0) params.append('page', `${opts.page}`); - if (opts?.zipCode) params.append('zipCode', opts.zipCode); - if (opts?.query) params.append('query', opts.query); - if (opts?.includeBranch) params.append('includeBranch', 'true'); - if (opts?.userType) params.append('userType', opts.userType); - if (opts?.status) params.append('status', opts.status); - - const query = params.toString(); - - const res = await api.get>( - `/user${(params && '?'.concat(query)) || ''}`, - { - headers: { - 'X-Session-Id': flow?.sessionId, - 'X-Rtid': flow?.refTransactionId || flowStore.rtid, - 'X-Tid': flow?.transactionId, - }, - }, - ); + const res = await api.get>(`/user`, { params: opts }); if (res && res.status === 200) { data.value = res.data;