mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-03 11:20:50 +08:00
feat: initialize new React application structure with TypeScript, ESLint, and Prettier configurations, while removing legacy files and adding new components and pages for enhanced functionality
This commit is contained in:
23
src/services/api/logs.ts
Normal file
23
src/services/api/logs.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* 日志相关 API
|
||||
*/
|
||||
|
||||
import { apiClient } from './client';
|
||||
|
||||
export interface LogsQuery {
|
||||
after?: string | number;
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
export const logsApi = {
|
||||
fetchLogs: (params: LogsQuery = {}) => apiClient.get('/logs', { params }),
|
||||
|
||||
clearLogs: () => apiClient.delete('/logs'),
|
||||
|
||||
fetchErrorLogs: () => apiClient.get('/request-error-logs'),
|
||||
|
||||
downloadErrorLog: (filename: string) =>
|
||||
apiClient.getRaw(`/request-error-logs/${encodeURIComponent(filename)}`, {
|
||||
responseType: 'blob'
|
||||
})
|
||||
};
|
||||
Reference in New Issue
Block a user