This commit is contained in:
randogoth 2023-05-22 12:00:25 +03:00
parent 43220b42f3
commit 37a755025d
2 changed files with 7 additions and 3 deletions

View file

@ -50,6 +50,6 @@ def track():
return str(len(db[hash][cat]))
else:
return 'hash missing'
return str(0)
serve(app, host='0.0.0.0', port=8001)

View file

@ -30,8 +30,12 @@ fetch('https://nmns.place/track?' + new URLSearchParams({
ua: ua,
cat: cat
})).then(response => response.text().then((progress) => {
if ( progress != '0') {
total = document.querySelector('span#progress').innerHTML
document.querySelector('span#progress').innerHTML = progress + ' of ' + total
} else {
document.querySelector('span#progress').innerHTML = 'anonymous'
}
}))
.catch(error => {
// handle the error