Commit 627b9eff authored by Jasper Verbeet's avatar Jasper Verbeet 🙇🏻

Fixes

parent 8a41b3e6
......@@ -90,8 +90,8 @@ app.get('/api/notification', (req, res) => {
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);
const currentWeight = parseInt(scale(currentWeightNum, 0, 10000, 0, 100));
const newWeight = parseInt(scale(currentWeightNum + weightNum, 0, 10000, 0, 100));
const increase = `${Math.round((newWeight / currentWeight) * 100)}%`;
const size = `${getDbItem('width')} x ${getDbItem('height')} x ${getDbItem('depth')} cm`;
const time = getDbItem('added_time') | 0;
......
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