fix: dont validate read event-type
parent
35ebf53f19
commit
eb03188d78
|
@ -55,7 +55,7 @@ export async function eventTypeById(
|
|||
case "GET":
|
||||
await prisma.eventType
|
||||
.findUnique({ where: { id: safeQuery.data.id } })
|
||||
.then((data) => schemaEventTypeReadPublic.parse(data))
|
||||
// .then((data) => schemaEventTypeReadPublic.parse(data))
|
||||
.then((event_type) => res.status(200).json({ event_type }))
|
||||
.catch((error: Error) =>
|
||||
res.status(404).json({
|
||||
|
|
|
@ -30,8 +30,8 @@ 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((eventType) => schemaEventTypeReadPublic.parse(eventType));
|
||||
if (data) res.status(200).json({ event_types: data });
|
||||
else
|
||||
(error: Error) =>
|
||||
res.status(404).json({
|
||||
|
|
Loading…
Reference in New Issue