fix: some logggingeventtypeid

This commit is contained in:
Agusti Fernandez Pardo
2022-05-27 21:51:40 +02:00
parent eee5fd0090
commit 0b66e964fe
+2
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) {