mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-10 03:09:50 +08:00
refactor: 简化优先级拖拽交换逻辑并优化用户配额处理
- 优先级拖拽改为直接交换优先级值,而非重新编号 - 添加 Provider 优先级的点击编辑功能 - 创建用户时由后端统一处理默认配额逻辑 - 移除前端 getDefaultQuota API 调用和后端对应端点 Close #97
This commit is contained in:
@@ -22,6 +22,7 @@ export interface CreateUserRequest {
|
||||
email: string
|
||||
role?: 'admin' | 'user'
|
||||
quota_usd?: number | null
|
||||
unlimited?: boolean
|
||||
allowed_providers?: string[] | null
|
||||
allowed_api_formats?: string[] | null
|
||||
allowed_models?: string[] | null
|
||||
@@ -98,11 +99,6 @@ export const usersApi = {
|
||||
await apiClient.patch(`/api/admin/users/${userId}/quota`)
|
||||
},
|
||||
|
||||
async getDefaultQuota(): Promise<{ default_quota_usd: number }> {
|
||||
const response = await apiClient.get<{ default_quota_usd: number }>('/api/admin/users/defaults/quota')
|
||||
return response.data
|
||||
},
|
||||
|
||||
// 管理员统计
|
||||
async getUsageStats(): Promise<any> {
|
||||
const response = await apiClient.get('/api/admin/usage/stats')
|
||||
|
||||
Reference in New Issue
Block a user