Implemented endpoint to delete all captures
This commit is contained in:
parent
1e08972b86
commit
904703b581
3 changed files with 18 additions and 1 deletions
|
|
@ -55,6 +55,17 @@ function deleteCapture(capture_id) {
|
|||
}
|
||||
}
|
||||
|
||||
function deleteAllCaptures() {
|
||||
function deleteAllCapturesCallback(response, status) {
|
||||
console.log(status);
|
||||
getCaptures();
|
||||
}
|
||||
var r = confirm("Warning! This will delete all copies of all captures from the Raspberry Pi. Click OK to proceed.");
|
||||
if (r == true) {
|
||||
safeRequest("DELETE", baseURI+"/capture/", null, deleteAllCapturesCallback, false)
|
||||
}
|
||||
}
|
||||
|
||||
function getCaptures() {
|
||||
function updateCapturesCallback(response, status) {
|
||||
console.log(status);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue