From cfe6d1c577330ce685537636ca9264146d6c0955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 10 May 2026 18:06:49 +0200 Subject: [PATCH] chore(api): drop maintainer-name comment in analytics route MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Phase D security review flagged a "Marc's data (572 paired readings, …)" comment in the analytics route. It predates v1.4.20 but the file received new commits in this release, so neutralise the example to a generic "busy account" wording that conveys the same shape without leaking a maintainer name. Fixes Security-LOW-4. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/app/api/analytics/route.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/api/analytics/route.ts b/src/app/api/analytics/route.ts index 47f3f1b58..9b30ab1a9 100644 --- a/src/app/api/analytics/route.ts +++ b/src/app/api/analytics/route.ts @@ -76,11 +76,12 @@ export const GET = apiHandler(async () => { // days. Up to v1.4.18 we filtered to the last 30 days at the DB // level and the headline (`bpInTargetPct`) was routed through // `windows.last30Days?.pct` — making the headline a literal copy - // of the `30T` sub-value. For Marc's data (572 paired readings, - // recent 30d = 50 %, all-time ≈ 11 %) the tile pinned 50/50/50 - // and looked algorithmically broken. The windowed helper now also - // returns an independent `allTime` aggregate, which we surface as - // the headline so the three numbers can diverge naturally. + // of the `30T` sub-value. On a busy account (e.g. 572 paired + // readings with recent 30d = 50 %, all-time ≈ 11 %) the tile + // pinned 50/50/50 and looked algorithmically broken. The windowed + // helper now also returns an independent `allTime` aggregate, + // which we surface as the headline so the three numbers can + // diverge naturally. const [sysData, diaData] = await Promise.all([ prisma.measurement.findMany({ where: { userId: user.id, type: "BLOOD_PRESSURE_SYS" },