import { api } from "./client"; import type { Profile, ProfileRequest } from "./types"; /** 讀取目前登入使用者的個人資料。 */ export function getProfile(): Promise { return api.get("v1/me/profile").json(); } /** 建立或完整更新目前登入使用者的個人資料。 */ export function updateProfile(request: ProfileRequest): Promise { return api.put("v1/me/profile", { json: request }).json(); }