Added vet alert and hisorical weight trends

This commit is contained in:
blaisadmin
2026-04-18 18:08:45 -04:00
parent e06dae91a3
commit 8dd3cd50fc
4 changed files with 570 additions and 90 deletions
+1 -1
View File
@@ -2014,7 +2014,7 @@ app.delete('/api/birds/:birdId', requireAuth, requireWriteAccess, requireWorkspa
app.get('/api/birds/:birdId/weights', requireAuth, async (req: Request, res: Response, next: NextFunction) => {
try {
const days = Math.min(Math.max(Number(req.query.days ?? 30), 1), 365);
const days = Math.min(Math.max(Number(req.query.days ?? 30), 1), 425);
const weights = await listWeightsForBird(req.params.birdId, req.auth!.workspace.id, days);
res.json({ weights: weights.map(normalizeWeight) });
} catch (error) {