fix: dont parse on read event-type
parent
a39d396c8e
commit
fa157961be
|
@ -39,7 +39,6 @@ const schemaEventTypeBaseParams = z
|
|||
description: z.string().optional().nullable(),
|
||||
length: z.number().int(),
|
||||
locations: jsonSchema.optional().nullable().or(z.null()),
|
||||
metadata: z.any().optional().nullable().or(z.null()),
|
||||
recurringEvent: jsonSchema.optional().nullable().or(z.null()),
|
||||
})
|
||||
.strict();
|
||||
|
|
|
@ -30,7 +30,7 @@ async function createOrlistAllEventTypes(
|
|||
* description: No event types were found
|
||||
*/
|
||||
const data = await prisma.eventType.findMany({ where: { userId } });
|
||||
const event_types = data.map((eventType) => schemaEventTypeReadPublic.parse(eventType));
|
||||
const event_types = data.map((eventType) => eventType);
|
||||
if (event_types) res.status(200).json({ event_types });
|
||||
else
|
||||
(error: Error) =>
|
||||
|
|
Loading…
Reference in New Issue