Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix(meatspace): round fractional drink/nicotine counts in MortalLoom export

Adam Eivy645e1727b7f5
diff --git a/server/routes/meatspace.js b/server/routes/meatspace.js
index 0fb16d7b86..e925efad46 100644
--- a/server/routes/meatspace.js
+++ b/server/routes/meatspace.js
@@ -899,7 +899,7 @@ router.get('/export/mortalloom', asyncHandler(async (req, res) => {
name: drink.name,
oz: drink.oz,
abv: drink.abv,
- count: drink.count || 1,
+ count: Math.max(1, Math.round(drink.count || 1)),
date: entry.date,
});
}
@@ -913,7 +913,7 @@ router.get('/export/mortalloom', asyncHandler(async (req, res) => {
id: crypto.randomUUID(),
product: item.product,
mgPerUnit: item.mgPerUnit,
- count: item.count || 1,
+ count: Math.max(1, Math.round(item.count || 1)),
date: entry.date,
});
}