Fix:
- profile/[id]/edit.tsx: api upload
- profile/[id]/update-photo.tsx: api upload
- service/api-client/api-profile.ts: api profile bisa memilih kategori

Component
Add:
- components/Image/AvatarComp.tsx

### No Issue
This commit is contained in:
2025-08-27 12:16:31 +08:00
parent 7cddc7abe3
commit 2227aaa99f
9 changed files with 106 additions and 38 deletions

View File

@@ -15,11 +15,13 @@ export async function apiProfile({ id }: { id: string }) {
export async function apiUpdateProfile({
id,
data,
category,
}: {
id: string;
data: any;
category: "profile" | "photo" | "background";
}) {
const response = await apiConfig.put(`/mobile/profile/${id}`, {
const response = await apiConfig.put(`/mobile/profile/${id}?category=${category}`, {
data: data,
});
return response.data;