import { apiFetch } from '../lib/api' export interface UpdateProfilePayload { name: string email: string } export interface UpdateProfileResult { name: string email: string photo: string } export interface UploadPhotoResult { photoUrl: string } export const userService = { updateProfile: async (payload: UpdateProfilePayload): Promise => { return apiFetch('/auth/profile', { method: 'PUT', body: payload, }) }, uploadPhoto: async (file: File): Promise => { const form = new FormData() form.append('photo', file) return apiFetch('/auth/profile/photo', { method: 'POST', body: form, }) }, }