mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
feat: 用户创建和注册时使用系统配置的默认配额
- 新增 /api/admin/users/defaults/quota 接口获取默认配额 - 用户注册时从系统配置读取默认配额 - 管理员创建用户时自动获取并使用系统默认配额
This commit is contained in:
@@ -98,6 +98,11 @@ 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