mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-10 03:32:26 +08:00
refactor(frontend): 优化工具和 API 模块
- 改进 sanitize 工具函数 - 优化 mocks 数据和处理器 - 优化 auth API 模块
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import type { User, LoginResponse } from '@/api/auth'
|
||||
import type { DashboardStatsResponse, RecentRequest, ProviderStatus, DailyStatsResponse } from '@/api/dashboard'
|
||||
import type { User as AdminUser, ApiKey } from '@/api/users'
|
||||
import type { AdminApiKey, AdminApiKeysResponse } from '@/api/admin'
|
||||
import type { AdminApiKeysResponse } from '@/api/admin'
|
||||
import type { Profile, UsageResponse } from '@/api/me'
|
||||
import type { ProviderWithEndpointsSummary, GlobalModelResponse } from '@/api/endpoints/types'
|
||||
|
||||
|
||||
@@ -1571,7 +1571,7 @@ registerDynamicRoute('GET', '/api/admin/providers/:providerId/available-source-m
|
||||
})
|
||||
|
||||
// 分配 GlobalModels 到 Provider
|
||||
registerDynamicRoute('POST', '/api/admin/providers/:providerId/assign-global-models', async (config, params) => {
|
||||
registerDynamicRoute('POST', '/api/admin/providers/:providerId/assign-global-models', async (config, _params) => {
|
||||
await delay()
|
||||
requireAdmin()
|
||||
const body = JSON.parse(config.data || '{}')
|
||||
@@ -1620,7 +1620,7 @@ registerDynamicRoute('DELETE', '/api/admin/models/global/:modelId', async (_conf
|
||||
})
|
||||
|
||||
// GlobalModel 批量分配到 Providers
|
||||
registerDynamicRoute('POST', '/api/admin/models/global/:modelId/assign-to-providers', async (config, params) => {
|
||||
registerDynamicRoute('POST', '/api/admin/models/global/:modelId/assign-to-providers', async (config, _params) => {
|
||||
await delay()
|
||||
requireAdmin()
|
||||
const body = JSON.parse(config.data || '{}')
|
||||
|
||||
Reference in New Issue
Block a user