Commit 6e1ab9e8 authored by Jasper Verbeet's avatar Jasper Verbeet 🙇🏻

Fixes

parent da4c5f6a
......@@ -87,8 +87,8 @@ app.get('/api/notification', (req, res) => {
console.log(colors.magenta(`${new Date().toLocaleString()} Polling from app`));
if (!newItem) {
const weightNum = int(getDbItem('weight')) || 0;
const currentWeightNum = int(getDbItem('current_weight')) || 1;
const weightNum = parseInt(getDbItem('weight')) || 0;
const currentWeightNum = parseInt(getDbItem('current_weight')) || 1;
const weight = `${weightNum} kg`;
const currentWeight = scale(currentWeightNum, 0, 10000, 0, 1);
const newWeight = scale(currentWeightNum + weightNum, 0, 10000, 0, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment