fix: Remove trailing slashes from makers/models routes
FastAPI's redirect_slashes was causing /makers/ to redirect to /makers which then didn't match the route definition. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -63,13 +63,13 @@ export const carsApi = {
|
||||
},
|
||||
|
||||
getMakers: async (): Promise<CarMaker[]> => {
|
||||
const { data } = await api.get('/cars/makers/');
|
||||
const { data } = await api.get('/cars/makers');
|
||||
return data;
|
||||
},
|
||||
|
||||
getModels: async (makerId?: number): Promise<CarModel[]> => {
|
||||
const params = makerId ? { maker_id: makerId } : {};
|
||||
const { data } = await api.get('/cars/models/', { params });
|
||||
const { data } = await api.get('/cars/models', { params });
|
||||
return data;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user