Removed rounding from download & upload

This commit is contained in:
Mathias Wagner
2022-05-07 23:26:00 +02:00
parent 9823f03ac1
commit 6f1116ab62

View File

@@ -9,9 +9,9 @@ module.exports.get = () => {
module.exports.set = (ping, download, upload) => {
if (this.get() === undefined) {
return db.prepare("INSERT INTO recommendations (ping, download, upload) VALUES (?, ?, ?)")
.run(Math.round(ping), Math.round(download), Math.round(upload));
.run(Math.round(ping), download.toFixed(2), upload.toFixed(2));
} else {
return db.prepare("UPDATE recommendations SET ping = ?, download = ?, upload = ?")
.run(Math.round(ping), Math.round(download), Math.round(upload));
.run(Math.round(ping), download.toFixed(2), upload.toFixed(2));
}
}