blob: cd7aa5591c53ee518dddba5411b7e2982ac26193 [file] [log] [blame]
22301014b1477f72025-06-07 22:54:40 +08001import type { AxiosResponse } from "axios";
2import axios from "axios";
22301014356527a2025-06-09 17:46:56 +08003import type { UserDetailInfo, UserInfo } from "./type";
22301014b1477f72025-06-07 22:54:40 +08004import type { CommonResponse } from "../type";
5
6class UserAPi {
7 static getMe() :Promise<AxiosResponse<CommonResponse<UserInfo>>> {
2230101433099002025-06-08 23:14:17 +08008 return axios.get('/api/user/me');
22301014b1477f72025-06-07 22:54:40 +08009 }
22301014356527a2025-06-09 17:46:56 +080010
11 static getMeDetail(userid:string) :Promise<AxiosResponse<CommonResponse<UserDetailInfo>>> {
12 return axios.get(`/api/user/${userid}`);
13 }
22301014b1477f72025-06-07 22:54:40 +080014}
15
22301014356527a2025-06-09 17:46:56 +080016
22301014b1477f72025-06-07 22:54:40 +080017export default UserAPi;