feat: 任务可调并发、可批量操作,导航栏可收缩
This commit is contained in:
@@ -74,6 +74,13 @@ export function pauseJob(id: string) {
|
||||
return api<DownloadJob>(`/api/download/jobs/${id}/pause`, { method: "POST" });
|
||||
}
|
||||
|
||||
export function updateConcurrency(id: string, concurrency: number) {
|
||||
return api<DownloadJob>(`/api/download/jobs/${id}/concurrency`, {
|
||||
method: "PUT",
|
||||
body: JSON.stringify({ concurrency }),
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteJob(id: string, files: boolean) {
|
||||
const flag = files ? "true" : "false";
|
||||
return api<unknown>(`/api/download/jobs/${encodeURIComponent(id)}?files=${flag}`, { method: "DELETE" });
|
||||
|
||||
Reference in New Issue
Block a user