fix(api): remove trailing slashes from company API endpoints for consistency
This commit is contained in:
@@ -20,7 +20,6 @@ export interface Company {
|
|||||||
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>> {
|
||||||
|
|||||||
Reference in New Issue
Block a user