fix: some logggingeventtypeid

pull/9078/head
Agusti Fernandez Pardo 2022-05-27 21:51:40 +02:00
parent eee5fd0090
commit 0b66e964fe
1 changed files with 2 additions and 0 deletions

View File

@ -25,6 +25,8 @@ 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) {