feat: 7.2
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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>();
|
||||
}
|
||||
Reference in New Issue
Block a user