Skip to content

Scheduling infrastructure for absolutely everyone.

fix: update prefix to cal_

Agusti Fernandez Pardo187b97afa169
diff --git a/.env.example b/.env.example
index 038c1ebd266..f3271e560c4 100644
--- a/.env.example
+++ b/.env.example
@@ -1 +1 @@
-API_KEY_PREFIX=pt_secret_
\ No newline at end of file
+API_KEY_PREFIX=cal_
\ No newline at end of file
diff --git a/lib/helpers/verifyApiKey.ts b/lib/helpers/verifyApiKey.ts
index 99867078841..6fe33c6ad3e 100644
--- a/lib/helpers/verifyApiKey.ts
+++ b/lib/helpers/verifyApiKey.ts
@@ -15,7 +15,7 @@ const today = new Date();
export const verifyApiKey: NextMiddleware = async (req, res, next) => {
if (!req.query.apiKey) res.status(401).json({ message: "No API key provided" });
- const strippedApiKey = `${req.query.apiKey}`.replace(process.env.API_KEY_PREFIX || "pt_secret_", "");
+ const strippedApiKey = `${req.query.apiKey}`.replace(process.env.API_KEY_PREFIX || "cal_", "");
const hashedKey = hashAPIKey(strippedApiKey);
await prisma.apiKey