Phase C5: Storage Quota - user/membership tier quota management

This commit is contained in:
qyyfw committed 2026-07-06 08:13:51 +08:00
1 parent 6ccf6d6867
commit 4b49333f9d
4 files changed
+1039 -509

No files matched your search

+13
View File
@@ -513,6 +513,19 @@ export const adminAPI = {
toggleAdminStorageConfig: (id: string) => put<any>(`/admin/storage/${id}/toggle`),
setDefaultAdminStorageConfig: (id: string) => put<any>(`/admin/storage/${id}/set-default`),
testAdminStorageConfig: (data: any) => post<any>('/admin/storage/test', data),
// Storage Quota APIs (Phase C5)
getStorageQuotaOverview: () => get<any>('/admin/storage/quota/overview'),
getStorageQuotaUsers: (params?: any) => {
if (params) {
const query = Object.entries(params).map(([k, v]) => v !== undefined && v !== '' && v !== null ? `${k}=${encodeURIComponent(String(v))}` : '').filter(Boolean).join('&');
return get<any>(`/admin/storage/quota/users${query ? '?' + query : ''}`);
}
return get<any>('/admin/storage/quota/users');
},
getStorageQuotaUser: (userId: string) => get<any>(`/admin/storage/quota/users/${userId}`),
adjustStorageQuota: (userId: string, data: any) => put<any>(`/admin/storage/quota/users/${userId}`, data),
recalcStorageQuota: (userId: string) => post<any>(`/admin/storage/quota/recalculate/${userId}`, {}),
initAllStorageQuotas: () => post<any>('/admin/storage/quota/init-all', {}),
// 自动化任务调度 (Phase 3.2)
getAdminAutomationStats: () => get<any>('/admin/automation/stats/overview'),
File diff suppressed because it is too large. Load diff