修复账号删除报错+添加批量删除功能

- 修复单个删除报错:删除账号前先删除关联的LoginTask(外键约束)
- 新增批量删除接口 DELETE /api/accounts/batch/delete
- 路由顺序:/batch/delete 在 /{account_id} 前注册避免路径冲突
- 前端添加批量删除按钮(带确认弹窗)
- 前端添加 batchDelete API
This commit is contained in:
yml2213
2026-06-23 01:29:03 +08:00
parent d47b8e24fa
commit 5a4805814f
3 changed files with 67 additions and 0 deletions
+2
View File
@@ -53,6 +53,8 @@ export const accountApi = {
api.put<any, any>('/accounts/batch-tag', { account_ids, tag }),
listTags: () => api.get<any, string[]>('/accounts/tags/list'),
delete: (id: number) => api.delete<any, any>(`/accounts/${id}`),
batchDelete: (account_ids: number[]) =>
api.delete<any, any>('/accounts/batch/delete', { params: { account_ids: account_ids.join(',') } }),
};
export const loginApi = {