Adding unsaved captures deletion

This commit is contained in:
Félix Aime
2021-06-03 14:08:34 +02:00
parent e04ef547c2
commit 2968d6fcb6
4 changed files with 37 additions and 2 deletions

View File

@ -113,7 +113,11 @@ export default {
router.replace({ name: 'save-capture', params: { capture_token: capture_token } });
},
new_capture: function() {
router.push({ name: 'generate-ap' })
axios.get('/api/misc/delete-captures', { timeout: 30000 })
.then(response => {
router.push({ name: 'generate-ap' })
})
.catch(err => (console.log(err)))
},
grep_keyword: function(kw, level){
try {

View File

@ -39,6 +39,10 @@
})
.catch(err => (console.log(err)))
},
delete_captures: function() {
axios.get('/api/misc/delete-captures', { timeout: 30000 })
.catch(err => (console.log(err)))
},
goto_home: function() {
var list_ssids = this.list_ssids
var internet = this.internet
@ -46,6 +50,7 @@
}
},
created: function() {
this.delete_captures();
setTimeout(function () { this.internet_check(); }.bind(this), 5000);
}
}