refactor: project structure (3)
This commit is contained in:
parent
61ab59e027
commit
c0fefa4211
3 changed files with 9 additions and 63 deletions
|
|
@ -379,17 +379,7 @@ const useEmployeeStore = defineStore('api-employee', () => {
|
|||
status?: 'CREATED' | 'ACTIVE' | 'INACTIVE';
|
||||
query?: string;
|
||||
}) {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
for (const [k, v] of Object.entries(opts || {})) {
|
||||
v !== undefined && params.append(k, v.toString());
|
||||
}
|
||||
|
||||
const query = params.toString();
|
||||
|
||||
const res = await api.get(
|
||||
`/employee/stats/gender${(params && '?'.concat(query)) || ''}`,
|
||||
);
|
||||
const res = await api.get(`/employee/stats/gender`, { params: opts });
|
||||
if (res && res.status === 200) {
|
||||
return res.data;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue