import type {
  LogDetailResponse,
  LogListParams,
  LogListResponse,
} from '@/pages/LogAudit/data';
import { request } from '@umijs/max';

/** 获取日志审计列表 GET /api/logs */
export async function queryLogList(params: LogListParams) {
  return request<LogListResponse>('/api/logs', {
    method: 'GET',
    params,
  });
}

/** 获取日志详情 GET /api/logs/:id */
export async function getLogDetail(id: string) {
  return request<LogDetailResponse>(`/api/logs/${id}`, {
    method: 'GET',
  });
}
