From 90a0492f68b0684ce64b6ec82537a7ebc20584bb Mon Sep 17 00:00:00 2001 From: frectonz Date: Thu, 13 Jun 2024 10:17:38 +0300 Subject: [PATCH] fix: use nullable --- ui/src/api.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ui/src/api.ts b/ui/src/api.ts index 2c48471..d947fe0 100644 --- a/ui/src/api.ts +++ b/ui/src/api.ts @@ -7,12 +7,11 @@ const overview = z.object({ file_name: z.string(), sqlite_version: z.string(), file_size: z.string(), - created: z.optional( - z - .string() - .datetime() - .transform((x) => new Date(x)), - ), + created: z + .string() + .datetime() + .transform((x) => new Date(x)) + .nullable(), modified: z .string() .datetime()