mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 22:26:13 +00:00
test(anamnesis): drive the life circumstances, AUDIT-C and its backup through real Postgres and the manage matrix
This commit is contained in:
1 parent
88aa5ccacd
commit
4d2c8c2bbb
8 files changed
+718
-16
No files matched your search
@@ -16,7 +16,7 @@ import {
|
||||
correctLifeFact,
|
||||
removeHealthProfileFact,
|
||||
} from "@/lib/profile/health-facts";
|
||||
import { dayStartUtc } from "@/lib/profile/life-derived";
|
||||
import { dateOnlyAtNoonUtc } from "@/lib/tz/date-only";
|
||||
import {
|
||||
validateCorrectedFactValue,
|
||||
type HealthProfileFactKind,
|
||||
@@ -63,7 +63,7 @@ export const PATCH = apiHandler(
|
||||
// circumstances (v1.43, #614).
|
||||
const now = new Date();
|
||||
const validFrom = parsed.data.validFrom
|
||||
? dayStartUtc(parsed.data.validFrom)
|
||||
? dateOnlyAtNoonUtc(parsed.data.validFrom)
|
||||
: undefined;
|
||||
let corrected: { id: string; kind: string } | null;
|
||||
if (isLifeFactKind(current.kind)) {
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
createLifeFact,
|
||||
readHealthProfileFacts,
|
||||
} from "@/lib/profile/health-facts";
|
||||
import { dayStartUtc } from "@/lib/profile/life-derived";
|
||||
import { dateOnlyAtNoonUtc } from "@/lib/tz/date-only";
|
||||
import { factWriteSchema } from "@/lib/validations/life-circumstances";
|
||||
|
||||
/**
|
||||
@@ -51,7 +51,7 @@ async function postFact(request: NextRequest): Promise<Response> {
|
||||
|
||||
const now = new Date();
|
||||
const validFrom = parsed.data.validFrom
|
||||
? dayStartUtc(parsed.data.validFrom)
|
||||
? dateOnlyAtNoonUtc(parsed.data.validFrom)
|
||||
: undefined;
|
||||
try {
|
||||
const input = parsed.data;
|
||||
|
||||
Reference in new issue
Block a user