fix: more logging
parent
4629c5d5c7
commit
6099bfb4ee
|
@ -40,5 +40,6 @@ export const verifyApiKey: NextMiddleware = async (req, res, next) => {
|
|||
if (!apiKey.userId) return res.status(404).json({ error: "No user found for this apiKey" });
|
||||
/* We save the user id in the request for later use */
|
||||
req.userId = apiKey.userId;
|
||||
console.log(`User ${apiKey.userId} verified`);
|
||||
await next();
|
||||
};
|
||||
|
|
|
@ -33,7 +33,7 @@ async function createOrlistAllEventTypes(
|
|||
const data = await prisma.eventType
|
||||
.findMany({ where: { userId } })
|
||||
.catch((error) => res.status(404).json({ message: "No event types were found", error }));
|
||||
console.log("eventTypes:", data);
|
||||
console.log(`userid is: ${userId}`, "eventTypes:", data);
|
||||
// const event_types = data.map(
|
||||
// async (eventType) => await schemaEventTypeReadPublic.safeParseAsync(eventType)
|
||||
// );
|
||||
|
|
Loading…
Reference in New Issue