mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-25 21:57:48 +00:00
This commit removes the deprecated frontend/web-old directory, updates various project configuration files including tsconfig, vite config, environment variables, and backend data models. It also fixes several API paths, adds tenant awareness to multiple models, and makes minor UI adjustments.
55 lines
1.0 KiB
TypeScript
55 lines
1.0 KiB
TypeScript
import { request } from "@utils";
|
|
|
|
const API_PATH = "/monitor/online";
|
|
|
|
const OnlineAPI = {
|
|
// 查询在线用户列表
|
|
listOnline(query: OnlineUserPageQuery) {
|
|
return request<ApiResponse<PageResult<OnlineUserTable>>>({
|
|
url: `${API_PATH}/list`,
|
|
method: "get",
|
|
params: query,
|
|
});
|
|
},
|
|
|
|
// 强退用户
|
|
deleteOnline(body: string) {
|
|
return request<ApiResponse>({
|
|
url: `${API_PATH}/delete`,
|
|
method: "delete",
|
|
data: body,
|
|
});
|
|
},
|
|
|
|
// 强退用户
|
|
clearOnline() {
|
|
return request<ApiResponse>({
|
|
url: `${API_PATH}/clear`,
|
|
method: "delete",
|
|
});
|
|
},
|
|
};
|
|
|
|
export default OnlineAPI;
|
|
|
|
export interface OnlineUserPageQuery extends PageQuery {
|
|
ipaddr?: string;
|
|
name?: string;
|
|
login_location?: string;
|
|
}
|
|
|
|
export interface OnlineUserTable {
|
|
session_id: string;
|
|
user_id: number;
|
|
tenant_id?: number;
|
|
is_super_admin?: boolean;
|
|
name: string;
|
|
user_name: string;
|
|
ipaddr?: string;
|
|
login_location?: string;
|
|
os?: string;
|
|
browser?: string;
|
|
login_time?: string;
|
|
login_type?: string;
|
|
}
|