feat: pauses & resumes downloads
This commit is contained in:
@@ -30,7 +30,13 @@ export default class extends Controller {
|
||||
}
|
||||
|
||||
pauseDownload(data) {
|
||||
fetch(`/api/download/${data.params.id}`, {method: 'PUT'})
|
||||
fetch(`/api/download/${data.params.id}/pause`, {method: 'PATCH'})
|
||||
.then(res => res.json())
|
||||
.then(json => console.debug(json));
|
||||
}
|
||||
|
||||
resumeDownload(data) {
|
||||
fetch(`/api/download/${data.params.id}/resume`, {method: 'PATCH'})
|
||||
.then(res => res.json())
|
||||
.then(json => console.debug(json));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user