clear stats interval on shutdown button, remove deprecated sync httpget

This commit is contained in:
Kevin Froman 2020-08-23 05:17:15 -05:00
parent 02fde0ad70
commit b66e1d852e
3 changed files with 10 additions and 14 deletions

View file

@ -23,8 +23,13 @@ restartBtn = document.getElementById('restartNode')
shutdownBtn.onclick = function(){
if (! nowebpass){
if (confirm("Really shutdown Onionr?")){
httpGet('/shutdownclean')
fetch('/shutdownclean', {
method: 'GET',
headers: {
"token": webpass
}})
overlay('shutdownNotice')
clearInterval(statsInterval)
}
}
}