fix: normalize postgres birth dates

This commit is contained in:
Jesse_Chen
2026-07-27 11:29:12 +08:00
parent a4bc9ae0c2
commit ce9f8fe1da
2 changed files with 14 additions and 1 deletions
@@ -13,7 +13,7 @@ import type {
} from "./birth-time-journey-service.ts";
const profileSchema = z.object({
birth_date: z.string(),
birth_date: z.union([z.string(), z.date().transform((value) => value.toISOString().slice(0, 10))]),
reported_birth_time: z.string().nullable().optional(),
birth_time_source: z.enum([
"hospital_record",