fix(all): resolve wallet callback validation, card-to-card conditional rendering, pet management tab, withdrawal settings, smart advisor loop, reports chart and announcement config
Deploy Canina / deploy (push) Successful in 1m47s
Deploy Canina / deploy (push) Successful in 1m47s
This commit is contained in:
1 parent
b807d25632
commit
d9254e9b01
14 files changed
+533
-77
No files matched your search
@@ -488,14 +488,23 @@ export default function PetProfile({ initialView }: {
|
||||
const fd = new FormData();
|
||||
fd.append('file', file);
|
||||
try {
|
||||
const res = await api.post('/upload', fd, { headers: { 'Content-Type': 'multipart/form-data' } });
|
||||
const res = await api.post('/pets/upload-image', fd, { headers: { 'Content-Type': 'multipart/form-data' } });
|
||||
const url = res.data?.url || res.data?.path || res.data?.data?.url;
|
||||
if (url) {
|
||||
setFormData({ ...formData, imageUrl: url });
|
||||
toast.success("تصویر با موفقیت آپلود شد");
|
||||
}
|
||||
} catch {
|
||||
toast.error("خطا در آپلود تصویر");
|
||||
try {
|
||||
const res = await api.post('/upload', fd, { headers: { 'Content-Type': 'multipart/form-data' } });
|
||||
const url = res.data?.url || res.data?.path || res.data?.data?.url;
|
||||
if (url) {
|
||||
setFormData({ ...formData, imageUrl: url });
|
||||
toast.success("تصویر با موفقیت آپلود شد");
|
||||
}
|
||||
} catch {
|
||||
toast.error("خطا در آپلود تصویر");
|
||||
}
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user