fix: update prefix to cal_
parent
1405f7a861
commit
187b97afa1
|
@ -1 +1 @@
|
|||
API_KEY_PREFIX=pt_secret_
|
||||
API_KEY_PREFIX=cal_
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue