feat(phase2): implement ItemPhotoUpload component and hook
This commit is contained in:
@@ -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;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user