diff --git a/src/schema/CommunityFarmSchema.ts b/src/schema/CommunityFarmSchema.ts index 5af0487..dc2147e 100644 --- a/src/schema/CommunityFarmSchema.ts +++ b/src/schema/CommunityFarmSchema.ts @@ -148,8 +148,8 @@ export const CreateCommunityEvent = z.object({ farmid: z.string(), title: z.string(), about: z.string(), - start_date: z.string().transform((arg) => formatTimestamp(arg)), - end_date: z.string().transform((arg) => formatTimestamp(arg)), + start_date: z.string(), + end_date: z.string(), type: z.union([z.literal('private'), z.literal('public')]), tags: z.union([z.array(z.string()), z.string()]).optional(), }), @@ -159,8 +159,8 @@ export const UpdateCommunityEvent = z.object({ body: z.object({ title: z.string().optional(), about: z.string().optional(), - start_date: z.string().transform((arg) => formatTimestamp(arg)), - end_date: z.string().transform((arg) => formatTimestamp(arg)), + start_date: z.string(), + end_date: z.string(), type: z.union([z.literal('private'), z.literal('public')]).optional(), tags: z.union([z.array(z.string()), z.string()]).optional(), }),