feat(phase2): implement ItemPhotoUpload component and hook

This commit is contained in:
2026-04-21 12:31:23 +03:00
parent e46777b933
commit db9aafd47f
8 changed files with 1092 additions and 2 deletions

View File

@@ -263,5 +263,13 @@ export const inventoryApi = {
testAiKey: async (provider: string, key: string) => {
const res = await axiosInstance.post('/admin/ai/settings/test-key', { provider, key });
return res.data;
}
},
// Photo Upload
uploadItemPhoto: async (itemId: number, formData: FormData) => {
const res = await axiosInstance.post(`/items/${itemId}/photo`, formData, {
headers: { 'Content-Type': 'multipart/form-data' }
});
return res.data;
},
};