Files
FastapiAdmin/frontend/web/src/api/module_system/log.ts
T
zhangtao 53d2a9d13e chore: cleanup old frontend code and update project configs
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.
2026-05-27 01:12:03 +08:00

69 lines
1.4 KiB
TypeScript

import { request } from "@utils";
const API_PATH = "/system/log";
const LogAPI = {
listLog(query: LogPageQuery) {
return request<ApiResponse<PageResult<LogTable>>>({
url: `${API_PATH}/list`,
method: "get",
params: query,
});
},
detailLog(query: number) {
return request<ApiResponse<LogTable>>({
url: `${API_PATH}/detail/${query}`,
method: "get",
});
},
deleteLog(body: number[]) {
return request<ApiResponse>({
url: `${API_PATH}/delete`,
method: "delete",
data: body,
});
},
exportLog(body: LogPageQuery) {
return request<Blob>({
url: `${API_PATH}/export`,
method: "post",
data: body,
responseType: "blob",
});
},
};
export default LogAPI;
export interface LogPageQuery extends PageQuery {
type?: number;
request_path?: string;
creator_name?: string;
created_time?: string[];
updated_time?: string[];
created_id?: number;
updated_id?: number;
}
export interface LogTable extends BaseType {
type?: number; // 1 登录日志 2 操作日志
request_path?: string;
request_method?: string;
request_ip?: string;
login_location?: string;
request_browser?: string;
request_os?: string;
response_code?: number;
request_payload?: string;
response_json?: string;
process_time?: string;
status?: string;
description?: string;
created_by?: CommonType;
updated_by?: CommonType;
deleted_by?: CommonType;
}