Scheduling infrastructure for absolutely everyone.
fix: event type validations skip
Agusti Fernandez Pardo1717f14e833c
diff --git a/lib/types.ts b/lib/types.tsindex f61e5d7f1c3..681e88de652 100644--- a/lib/types.ts+++ b/lib/types.ts@@ -153,10 +153,10 @@ interface EventTypeExtended extends Omit<EventType, "recurringEvent" | "location// EventTypeexport type EventTypeResponse = BaseResponse & {- event_type?: Partial<EventTypeExtended>;+ event_type?: Partial<EventType | EventTypeExtended>;};export type EventTypesResponse = BaseResponse & {- event_types?: Partial<EventTypeExtended>[];+ event_types?: Partial<EventType | EventTypeExtended>[];};// Paymentdiff --git a/pages/api/event-types/index.ts b/pages/api/event-types/index.tsindex 163fa501fb4..420983a162c 100644--- a/pages/api/event-types/index.ts+++ b/pages/api/event-types/index.ts@@ -30,8 +30,10 @@ 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));- if (event_types) res.status(200).json({ event_types });+ // const event_types = data.map(+ // async (eventType) => await schemaEventTypeReadPublic.safeParseAsync(eventType)+ // );+ if (data) res.status(200).json({ event_types: data });else(error: Error) =>res.status(404).json({