fix(api): remove trailing slashes from company API endpoints for consistency

This commit is contained in:
2026-01-23 12:23:34 -06:00
parent 4ee7b0e733
commit 69aa2ba500

View File

@@ -19,8 +19,7 @@ export interface Company {
responsible_last_name: string | null; responsible_last_name: string | null;
responsible_mother_last_name: string | null; responsible_mother_last_name: string | null;
responsible_rfc?: string | null; responsible_rfc?: string | null;
position?: string | null; position?: string | null;
logo?: string | null;
has_express_line?: boolean; has_express_line?: boolean;
is_service_company?: boolean; is_service_company?: boolean;
order_format_type?: string | null; order_format_type?: string | null;
@@ -107,7 +106,7 @@ export async function getCompanies(
} }
export async function getCompany(id: number): Promise<ApiResponse<Company>> { export async function getCompany(id: number): Promise<ApiResponse<Company>> {
return await api.get(`/v1/a76/company/${id}/`); return await api.get(`/v1/a76/company/${id}`);
} }
export async function createCompany(data: CompanyCreate): Promise<ApiResponse<Company>> { export async function createCompany(data: CompanyCreate): Promise<ApiResponse<Company>> {
@@ -115,7 +114,7 @@ export async function createCompany(data: CompanyCreate): Promise<ApiResponse<Co
} }
export async function updateCompany(id: number, data: CompanyUpdate): Promise<ApiResponse<Company>> { export async function updateCompany(id: number, data: CompanyUpdate): Promise<ApiResponse<Company>> {
return await api.put(`/v1/a76/company/${id}/`, data); return await api.put(`/v1/a76/company/${id}`, data);
} }
export async function deleteCompany(id: number): Promise<ApiResponse<void>> { export async function deleteCompany(id: number): Promise<ApiResponse<void>> {