feat: Cookie管理页面增加批量删除功能
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import api from './client';
|
||||
import type { CookieItem, MessageResponse } from './types';
|
||||
import type { CookieItem, MessageDeletedResponse, MessageResponse } from './types';
|
||||
|
||||
export const cookieApi = {
|
||||
list: () => api.get<CookieItem[], CookieItem[]>('/cookies'),
|
||||
exportCsv: (format?: string) => api.get<Blob, Blob>('/cookies/export', { responseType: 'blob', params: format ? { format } : {} }),
|
||||
delete: (id: number) => api.delete<MessageResponse, MessageResponse>(`/cookies/${id}`),
|
||||
deleteBatch: (ids: number[]) => api.delete<MessageDeletedResponse, MessageDeletedResponse>('/cookies/batch', { params: { task_ids: ids.join(',') } }),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user