mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-11 03:39:49 +08:00
refactor: 前端全面替换 any 为 unknown 并统一错误处理,后端用量记录补写请求头/体
- 前端 API 层、stores、conversation 解析器、组件全面替换 any 为 unknown/具体类型 - 错误处理统一使用 parseApiError/getErrorStatus 替代 err.response?.data?.detail 模式 - 后端 handler/TaskService/UsageLifecycle/StreamTracker 链路传递 request_headers/request_body - streaming/pending 状态更新时可补写客户端和提供商的请求头及请求体 - 新增 TaskService 和 UsageService 相关测试
This commit is contained in:
@@ -69,8 +69,8 @@ export const MOCK_LOGIN_RESPONSE_USER: LoginResponse = {
|
||||
// ========== Profile 数据 ==========
|
||||
|
||||
export const MOCK_ADMIN_PROFILE: Profile = {
|
||||
id: MOCK_ADMIN_USER.id!,
|
||||
email: MOCK_ADMIN_USER.email!,
|
||||
id: MOCK_ADMIN_USER.id ?? '',
|
||||
email: MOCK_ADMIN_USER.email ?? '',
|
||||
username: MOCK_ADMIN_USER.username,
|
||||
role: 'admin',
|
||||
is_active: true,
|
||||
@@ -87,8 +87,8 @@ export const MOCK_ADMIN_PROFILE: Profile = {
|
||||
}
|
||||
|
||||
export const MOCK_USER_PROFILE: Profile = {
|
||||
id: MOCK_NORMAL_USER.id!,
|
||||
email: MOCK_NORMAL_USER.email!,
|
||||
id: MOCK_NORMAL_USER.id ?? '',
|
||||
email: MOCK_NORMAL_USER.email ?? '',
|
||||
username: MOCK_NORMAL_USER.username,
|
||||
role: 'user',
|
||||
is_active: true,
|
||||
|
||||
Reference in New Issue
Block a user