From 9f509725702200f86eca958b928f2b32502d2cc2 Mon Sep 17 00:00:00 2001 From: Agusti Fernandez Pardo Date: Fri, 27 May 2022 20:49:50 +0200 Subject: [PATCH] fix event-types --- pages/api/event-types/index.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pages/api/event-types/index.ts b/pages/api/event-types/index.ts index 5c895a9165..786d4453f3 100644 --- a/pages/api/event-types/index.ts +++ b/pages/api/event-types/index.ts @@ -37,16 +37,7 @@ async function createOrlistAllEventTypes( select: { eventTypes: true }, }) .catch((error) => res.status(404).json({ message: "No event types were found", error })); -<<<<<<< HEAD -======= -<<<<<<< HEAD -======= - console.log(`userid is: ${userId}`, "eventTypes:", data); ->>>>>>> 6099bfb (fix: more logging) - // const event_types = data.map( - // async (eventType) => await schemaEventTypeReadPublic.safeParseAsync(eventType) - // ); ->>>>>>> d374031 (fix: more logging) + if (data) res.status(200).json({ event_types: data.eventTypes }); else (error: Error) =>