randydev commited on
Commit
542c81d
·
verified ·
1 Parent(s): b7bcb78

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +1 -1
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: userId });
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
  }