Added vet alert and hisorical weight trends
This commit is contained in:
+1
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user