From 15cdbb134f11012b4243c4c56aab81f2b04a1543 Mon Sep 17 00:00:00 2001 From: Agusti Fernandez Pardo Date: Mon, 4 Apr 2022 22:29:45 +0200 Subject: [PATCH] remove console statement --- lib/helpers/verifyApiKey.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helpers/verifyApiKey.ts b/lib/helpers/verifyApiKey.ts index 45f8acd9ce..55ee111451 100644 --- a/lib/helpers/verifyApiKey.ts +++ b/lib/helpers/verifyApiKey.ts @@ -17,7 +17,7 @@ export const verifyApiKey: NextMiddleware = async (req, res, next) => { res.status(401).json({ error: "Your api key is not valid" }); throw new Error("No api key found"); } - if (apiKey.expiresAt && apiKey.userId && dateInPast(apiKey.expiresAt, today)) { + if (apiKey.expiresAt && apiKey.userId && dateInPast(today, apiKey.expiresAt)) { res.setHeader("Calcom-User-ID", apiKey.userId); await next(); } else res.status(401).json({ error: "Your api key is not valid" });