Update index.js
Browse files
index.js
CHANGED
@@ -327,7 +327,7 @@ app.post('/api/v2/key/generate-key', authenticateApiKey, apiLimiter, async (req,
|
|
327 |
}
|
328 |
|
329 |
const existingUser = await ApiKey.findOne({ owner: userIdNumber });
|
330 |
-
|
331 |
if (existingUser) {
|
332 |
return res.status(200).json({
|
333 |
apiKey: existingUser.key,
|
|
|
327 |
}
|
328 |
|
329 |
const existingUser = await ApiKey.findOne({ owner: userIdNumber });
|
330 |
+
console.log(existingUser);
|
331 |
if (existingUser) {
|
332 |
return res.status(200).json({
|
333 |
apiKey: existingUser.key,
|