mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-30 08:22:34 +00:00
feat(admin): 支持按筛选结果全选账号
This commit is contained in:
@@ -715,6 +715,8 @@ export interface BatchOperationResult {
|
||||
total: number
|
||||
success: number
|
||||
failed: number
|
||||
success_ids?: number[]
|
||||
failed_ids?: number[]
|
||||
errors?: Array<{ account_id: number; error: string }>
|
||||
warnings?: Array<{ account_id: number; warning: string }>
|
||||
}
|
||||
@@ -729,6 +731,16 @@ export async function revertProxyFallback(id: number): Promise<{ message: string
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete multiple accounts with bounded server-side concurrency.
|
||||
*/
|
||||
export async function batchDelete(accountIds: number[]): Promise<BatchOperationResult> {
|
||||
const { data } = await apiClient.post<BatchOperationResult>('/admin/accounts/batch-delete', {
|
||||
account_ids: accountIds
|
||||
})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch clear account errors
|
||||
* @param accountIds - Array of account IDs
|
||||
@@ -968,6 +980,7 @@ export const accountsAPI = {
|
||||
importCodexSession,
|
||||
createOpenAICodexPAT,
|
||||
getAntigravityDefaultModelMapping,
|
||||
batchDelete,
|
||||
batchClearError,
|
||||
batchRefresh,
|
||||
setPrivacy,
|
||||
|
||||
Reference in New Issue
Block a user