Fix banner reorder API with proper request schema

- Create BannerReorderRequest Pydantic model for reorder endpoint
- Update frontend to send car_ids wrapped in object
- Fixes 422 Unprocessable Entity on reorder API

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
AutonetSellCar Deploy
2025-12-31 16:21:05 +09:00
parent 3cf6fd2121
commit 3a4475ea28
3 changed files with 10 additions and 4 deletions

View File

@@ -211,7 +211,7 @@ export const heroBannersApi = {
},
adminReorderBanners: async (carIds: number[]): Promise<{ message: string; count: number }> => {
const { data } = await api.put('/hero-banners/admin/reorder', carIds);
const { data } = await api.put('/hero-banners/admin/reorder', { car_ids: carIds });
return data;
},