fixing undefined variable
This commit is contained in:
@ -20,7 +20,7 @@ const validateApiKey = (req, res, next) => {
|
|||||||
token = authHeader.split(" ")[1];
|
token = authHeader.split(" ")[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
const providedKey = apiKeyHeader || token;
|
const providedKey = apiKey || token;
|
||||||
|
|
||||||
if (!providedKey) {
|
if (!providedKey) {
|
||||||
return res.status(400).json({ error: "API key is missing" });
|
return res.status(400).json({ error: "API key is missing" });
|
||||||
|
Reference in New Issue
Block a user