Files
sports-empower-hub/app/citizen-frontend/src/api/profile.ts
T
skytek_xinliang 332d00db75 feat: 7.2
2026-08-17 11:26:13 +08:00

13 lines
460 B
TypeScript

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