Update index.js
Browse files
index.js
CHANGED
@@ -566,7 +566,7 @@ app.post('/api/v1/key/generate-key', authenticateApiKey, apiLimiter, async (req,
|
|
566 |
return res.status(400).json({ error: "Invalid user_id" });
|
567 |
}
|
568 |
|
569 |
-
const isBanned = await bannedCollection.findOne({ user_id:
|
570 |
if (isBanned) {
|
571 |
return res.status(200).json({ message: "You are permanently banned from creating API keys", is_deleted: true });
|
572 |
}
|
|
|
566 |
return res.status(400).json({ error: "Invalid user_id" });
|
567 |
}
|
568 |
|
569 |
+
const isBanned = await bannedCollection.findOne({ user_id: userIdNumber });
|
570 |
if (isBanned) {
|
571 |
return res.status(200).json({ message: "You are permanently banned from creating API keys", is_deleted: true });
|
572 |
}
|