From dcb929be5b7b5976ef4b7df9dd01bd0077bbaafb Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 17 Apr 2026 17:22:41 +0000 Subject: [PATCH] fix(GRO-765): remove dead upcoming/past filter code in portal appointments The now/upcoming/past variables were unused after the response shape change to { appointments: appts }. QA flagged them as dead code. Co-Authored-By: Paperclip --- apps/api/src/routes/portal.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/api/src/routes/portal.ts b/apps/api/src/routes/portal.ts index 2becab5..fd5e475 100644 --- a/apps/api/src/routes/portal.ts +++ b/apps/api/src/routes/portal.ts @@ -40,7 +40,6 @@ portalRouter.get("/appointments", async (c) => { const db = getDb(); const clientId = c.get("portalClientId"); - const now = new Date(); const allAppts = await db .select({ id: appointments.id, @@ -83,9 +82,6 @@ portalRouter.get("/appointments", async (c) => { staff: a.staffId ? { id: staffMap[a.staffId]?.id, name: staffMap[a.staffId]?.name } : null, })); - const upcoming = appts.filter(a => a.startTime > now && a.status !== "cancelled"); - const past = appts.filter(a => a.startTime <= now || a.status === "cancelled"); - return c.json({ appointments: appts }); });