From 8627b28a8ea6da4cf40463b5d4334e7ff20a78a8 Mon Sep 17 00:00:00 2001 From: Agusti Fernandez Pardo Date: Fri, 27 May 2022 21:18:47 +0200 Subject: [PATCH] fix: conflicts --- lib/helpers/verifyApiKey.ts | 1 - pages/api/event-types/index.ts | 16 ---------------- 2 files changed, 17 deletions(-) diff --git a/lib/helpers/verifyApiKey.ts b/lib/helpers/verifyApiKey.ts index 11d481815e..38fa6b44c3 100644 --- a/lib/helpers/verifyApiKey.ts +++ b/lib/helpers/verifyApiKey.ts @@ -40,6 +40,5 @@ 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(); }; diff --git a/pages/api/event-types/index.ts b/pages/api/event-types/index.ts index 178b37028c..b5c82ef67d 100644 --- a/pages/api/event-types/index.ts +++ b/pages/api/event-types/index.ts @@ -10,7 +10,6 @@ async function createOrlistAllEventTypes( { method, body, userId }: NextApiRequest, res: NextApiResponse ) { - console.log("userId:", userId); if (method === "GET") { /** * @swagger @@ -37,22 +36,7 @@ async function createOrlistAllEventTypes( select: { eventTypes: true }, }) .catch((error) => res.status(404).json({ message: "No event types were found", error })); -<<<<<<< HEAD -======= -<<<<<<< HEAD -======= - console.log(`userid is: ${userId}`, "eventTypes:", data); ->>>>>>> 6099bfb (fix: more logging) - // const event_types = data.map( - // async (eventType) => await schemaEventTypeReadPublic.safeParseAsync(eventType) - // ); ->>>>>>> d374031 (fix: more logging) - if (data) res.status(200).json({ event_types: data.eventTypes }); - console.log(`userid is: ${userId}`, "eventTypes:", data); - // const event_types = data.map( - // async (eventType) => await schemaEventTypeReadPublic.safeParseAsync(eventType) - // ); if (data) res.status(200).json({ event_types: data.eventTypes }); else (error: Error) =>