fix: event type validations skip
This commit is contained in:
1 parent
d991c68b08
commit
1717f14e83
2 files changed
+6
-4
No files matched your search
@@ -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({
|
||||
|
||||
Reference in new issue
Block a user