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:
Supra4E8C
2025-12-07 11:32:31 +08:00
parent 8e4132200d
commit 450964fb1a
144 changed files with 14223 additions and 21647 deletions

View File

@@ -0,0 +1,19 @@
/**
* API 密钥管理
*/
import { apiClient } from './client';
export const apiKeysApi = {
async list(): Promise<string[]> {
const data = await apiClient.get('/api-keys');
const keys = (data && (data['api-keys'] ?? data.apiKeys)) as unknown;
return Array.isArray(keys) ? (keys as string[]) : [];
},
replace: (keys: string[]) => apiClient.put('/api-keys', keys),
update: (index: number, value: string) => apiClient.patch('/api-keys', { index, value }),
delete: (index: number) => apiClient.delete(`/api-keys?index=${index}`)
};