diff --git a/src/app/api/export/health-record/__tests__/route.test.ts b/src/app/api/export/health-record/__tests__/route.test.ts index a141cccbf..3b61abb58 100644 --- a/src/app/api/export/health-record/__tests__/route.test.ts +++ b/src/app/api/export/health-record/__tests__/route.test.ts @@ -37,7 +37,7 @@ vi.mock("@/lib/db", () => ({ userHealthProfile: { findUnique: vi.fn() }, healthProfileFactRevision: { findMany: vi.fn() }, // v1.43 — the anamnesis leaf also carries the newest AUDIT-C entry. - mentalHealthAssessment: { findFirst: vi.fn(async () => null) }, + mentalHealthAssessment: { findMany: vi.fn(async () => []) }, user: { findUnique: vi.fn(), update: vi.fn() }, // The whole-record gate reads the session's own stamps: a sign-in a // moment ago is the proof, on an account without a second factor. diff --git a/src/components/admin/pulse-day-mean-card.tsx b/src/components/admin/pulse-day-mean-card.tsx index 91bfbc0dc..9a78004f4 100644 --- a/src/components/admin/pulse-day-mean-card.tsx +++ b/src/components/admin/pulse-day-mean-card.tsx @@ -106,10 +106,12 @@ export function PulseDayMeanCard() { ? t("admin.section.pulseDayMean.applied") : t("admin.section.pulseDayMean.appliedNoRebuild"), ); - } else if (action === "rebuild") { - toast.success(t("admin.section.pulseDayMean.rebuildStarted")); } else { - toast.success(t("admin.section.pulseDayMean.dryRunStarted")); + toast.success( + action === "rebuild" + ? t("admin.section.pulseDayMean.rebuildStarted") + : t("admin.section.pulseDayMean.dryRunStarted"), + ); } void queryClient.invalidateQueries({ queryKey: queryKeys.adminPulseDayMean(), diff --git a/src/lib/profile/life-circumstances.ts b/src/lib/profile/life-circumstances.ts index 3ee481dd5..f9c02127d 100644 --- a/src/lib/profile/life-circumstances.ts +++ b/src/lib/profile/life-circumstances.ts @@ -13,7 +13,7 @@ * Server-only. */ import { Prisma } from "@/generated/prisma/client"; -import { decryptFromBytes, encryptToBytes } from "@/lib/ai/coach/bytes-codec"; +import { encryptToBytes } from "@/lib/ai/coach/bytes-codec"; import { deriveAgeYears } from "@/lib/ai/coach/about-me"; import { AUDIT_C_HISTORY_LIMIT,