pull/9078/head
Agusti Fernandez Pardo 2022-05-27 21:01:01 +02:00
parent 9f50972570
commit a91dd428c0
2 changed files with 0 additions and 2 deletions

View File

@ -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();
};

View File

@ -10,7 +10,6 @@ async function createOrlistAllEventTypes(
{ method, body, userId }: NextApiRequest,
res: NextApiResponse<EventTypesResponse | EventTypeResponse>
) {
console.log("userId:", userId);
if (method === "GET") {
/**
* @swagger