修复账号删除报错+添加批量删除功能
- 修复单个删除报错:删除账号前先删除关联的LoginTask(外键约束)
- 新增批量删除接口 DELETE /api/accounts/batch/delete
- 路由顺序:/batch/delete 在 /{account_id} 前注册避免路径冲突
- 前端添加批量删除按钮(带确认弹窗)
- 前端添加 batchDelete API
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user