Fix:
- service/api-client/api-donation.ts: penambahan fetch update, hapus dan update status donasi
- /(application)/(user)/donation/[id]/edit.tsx: integrasi ke API

### No issue
This commit is contained in:
2025-10-06 17:32:18 +08:00
parent ba878d4d08
commit 53cdca21fc
2 changed files with 281 additions and 65 deletions

View File

@@ -80,3 +80,22 @@ export async function apiDonationDelete({ id }: { id: string }) {
throw error;
}
}
export async function apiDonationUpdateData({
id,
data,
category,
}: {
id: string;
data: any;
category: "edit-donation" | "edit-story" | "edit-bank-account";
}) {
try {
const response = await apiConfig.put(`/mobile/donation/${id}?category=${category}`, {
data: data,
});
return response.data;
} catch (error) {
throw error;
}
}