From 7ee5682e1d02e20fb5bbb2f99e94d453a7ab1d0c Mon Sep 17 00:00:00 2001 From: ckat-1 Date: Tue, 29 Oct 2024 18:46:09 -0500 Subject: [PATCH] Fixing for test case --- src/server/api/routers/admin.ts | 2 +- src/utils/formSchemas.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/server/api/routers/admin.ts b/src/server/api/routers/admin.ts index 4fc849c..7a8163c 100644 --- a/src/server/api/routers/admin.ts +++ b/src/server/api/routers/admin.ts @@ -5,7 +5,7 @@ import { club } from '@src/server/db/schema/club'; import { userMetadataToClubs } from '@src/server/db/schema/users'; import { type DateRange } from 'react-day-picker'; import { admin, carousel } from '@src/server/db/schema/admin'; -import role from '@src/models/role'; + function isDateRange(value: unknown): value is DateRange { return Boolean(value && typeof value === 'object' && 'from' in value); diff --git a/src/utils/formSchemas.ts b/src/utils/formSchemas.ts index 988a51b..bffa824 100644 --- a/src/utils/formSchemas.ts +++ b/src/utils/formSchemas.ts @@ -1,5 +1,4 @@ -import { selectContact } from '@src/server/db/models'; -import { admin } from '@src/server/db/schema/admin'; + import { z } from 'zod'; import { contactSchema } from './contact';