fix(GRO-751): add server-side tip split validation to markPaid #343

Closed
lint-roller-qa[bot] wants to merge 3 commits from fix/gro-765-portal-appointments-service into dev
Showing only changes of commit dcb929be5b - Show all commits
-4
View File
@@ -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 });
});