import { APIClient } from "./ApiClient"; export interface User { id: number; name: string; email: string; time_create: number; time_activate: number; active: boolean; admin: boolean; has_password: boolean; } export class UserApi { /** * Get current user information */ static async GetUserInfo(): Promise { return ( await APIClient.exec({ uri: "/user/info", method: "GET", }) ).data; } /** * Update user profile */ static async UpdateProfile(name: string): Promise { await APIClient.exec({ uri: "/user/update_profile", method: "POST", jsonData: { name: name, }, }); } }