Skip to content

Scheduling infrastructure for absolutely everyone.

fix: add back types until merged into main

Agusti Fernandez Pardod10377684653
diff --git a/lib/helpers/verifyApiKey.ts b/lib/helpers/verifyApiKey.ts
index c467c6ce998..81bbb8db078 100644
--- a/lib/helpers/verifyApiKey.ts
+++ b/lib/helpers/verifyApiKey.ts
@@ -1,8 +1,20 @@
+import type { IncomingMessage } from "http";
import { NextMiddleware } from "next-api-middleware";
import { hashAPIKey } from "@calcom/ee/lib/api/apiKeys";
import prisma from "@calcom/prisma";
+/** @todo figure how to use the one from `@calcom/types`fi */
+/** @todo: remove once `@calcom/types` is updated with it.*/
+declare module "next" {
+ export interface NextApiRequest extends IncomingMessage {
+ userId: number;
+ query: {
+ apiKey: string;
+ };
+ }
+}
+
// Used to check if the apiKey is not expired, could be extracted if reused. but not for now.
export const dateNotInPast = function (date: Date) {
const now = new Date();