Merge pull request 'fix(api): add missing slashes in endpoint URLs for clients and unit measures' (#52) from fix/prod into development
Reviewed-on: ADUANASOFT/anexo76#52
This commit is contained in:
@@ -81,17 +81,17 @@ export const clientsProvidersApi = {
|
||||
if (value) params.append(key, value.toString());
|
||||
});
|
||||
}
|
||||
return api.get<ClientProviderListResponse>(`/v1/a76/clients-providers?${params.toString()}`);
|
||||
return api.get<ClientProviderListResponse>(`/v1/a76/clients-providers/?${params.toString()}`);
|
||||
},
|
||||
get: (id: number, companyId: number) =>
|
||||
api.get<ClientProvider>(`/v1/a76/clients-providers/${id}?company_id=${companyId}`),
|
||||
api.get<ClientProvider>(`/v1/a76/clients-providers/${id}/?company_id=${companyId}`),
|
||||
|
||||
create: (companyId: number, data: any) =>
|
||||
api.post<ClientProvider>(`/v1/a76/clients-providers?company_id=${companyId}`, data),
|
||||
api.post<ClientProvider>(`/v1/a76/clients-providers/?company_id=${companyId}`, data),
|
||||
|
||||
update: (id: number, companyId: number, data: any) =>
|
||||
api.patch<ClientProvider>(`/v1/a76/clients-providers/${id}?company_id=${companyId}`, data),
|
||||
|
||||
delete: (id: number, companyId: number) =>
|
||||
api.delete(`/v1/a76/clients-providers/${id}?company_id=${companyId}`)
|
||||
api.delete(`/v1/a76/clients-providers/${id}/?company_id=${companyId}`)
|
||||
};
|
||||
@@ -43,7 +43,7 @@ export async function getUnitMeasures(
|
||||
page_size: pageSize.toString(),
|
||||
...filters
|
||||
});
|
||||
return await api.get(`/a76/units-of-measure?${queryParams.toString()}`);
|
||||
return await api.get(`/a76/units-of-measure/?${queryParams.toString()}`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,7 +57,7 @@ export async function getUnitMeasure(id: number): Promise<ApiResponse<UnitMeasur
|
||||
* Crea una nueva unidad de medida
|
||||
*/
|
||||
export async function createUnitMeasure(data: UnitMeasureCreate): Promise<ApiResponse<UnitMeasure>> {
|
||||
return await api.post('/a76/units-of-measure', data);
|
||||
return await api.post('/a76/units-of-measure/', data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -161,10 +161,6 @@ export function getSidebarData(): SidebarData {
|
||||
title: m["sidebar.general_catalogs.company_information"](),
|
||||
url: "/dashboard/general_catalogs/company_information",
|
||||
},
|
||||
{
|
||||
title: "Catálogo de Clases de Activo Fijo",
|
||||
url: "/dashboard/catalogs/fixed-asset-classes",
|
||||
},
|
||||
{
|
||||
title: m["sidebar.general_catalogs.packages"](),
|
||||
url: "/dashboard/general_catalogs/packages",
|
||||
|
||||
Reference in New Issue
Block a user