diff --git a/pages/api/event-types/[id].ts b/pages/api/event-types/[id].ts index 8654585786..20ad84d776 100644 --- a/pages/api/event-types/[id].ts +++ b/pages/api/event-types/[id].ts @@ -25,8 +25,7 @@ export async function eventTypeById( select: { eventTypes: true }, }); const userEventTypes = data.eventTypes.map((eventType) => eventType.id); - console.log(userEventTypes); - console.log(userId); + if (!userEventTypes.includes(safeQuery.data.id)) res.status(401).json({ message: "Unauthorized" }); else { switch (method) {