restructure and reorganize

This commit is contained in:
2026-02-16 07:47:08 -06:00
parent 561aef8ee3
commit 6d046e90ed
29 changed files with 156 additions and 1797 deletions
+35
View File
@@ -0,0 +1,35 @@
import api from "../axios";
export const company = {
async fetch(accessToken: string, id: string) {
const company = await api.get(`/v1/company/companies/${id}`, {
headers: {
Authorization: `Bearer ${accessToken}`,
},
});
return company.data;
},
async fetchMany(accessToken: string, page: number = 1, search?: string) {
const params: Record<string, unknown> = { page };
if (search && search.length > 0) params.search = search;
const companies = await api.get("/v1/company/companies", {
params,
headers: {
Authorization: `Bearer ${accessToken}`,
},
});
return companies.data;
},
async fetchConfigurations(accessToken: string, id: string) {
const configurations = await api.get(
`/v1/company/companies/${id}/configurations`,
{
headers: {
Authorization: `Bearer ${accessToken}`,
},
},
);
return configurations.data;
},
};