feat(frontend): 新增 API 错误类型定义,优化错误处理

- 新增 api-error.ts 定义标准错误类型和工具函数
- 重构 error.ts 和 errorParser.ts 使用新类型
- 更新 api client 的类型定义
This commit is contained in:
fawney19
2025-12-12 16:14:33 +08:00
parent 348b454e1e
commit 738a8459c9
5 changed files with 107 additions and 24 deletions

View File

@@ -59,7 +59,7 @@ export const adminApi = {
is_active?: boolean
}): Promise<AdminApiKeysResponse> {
const response = await apiClient.get<AdminApiKeysResponse>('/api/admin/api-keys', {
params: params
params
})
return response.data
},