fix
Browse files
index.js
CHANGED
@@ -416,16 +416,11 @@ app.post('/api/v1/generate-key', async (req, res) => {
|
|
416 |
|
417 |
const existingUser = await collection.findOne({ owner: userIdNumber });
|
418 |
|
419 |
-
if (existingUser) {
|
420 |
-
return res.status(200).json({
|
421 |
-
is_banned: existingUser.is_banned || false
|
422 |
-
});
|
423 |
-
}
|
424 |
-
|
425 |
if (existingUser) {
|
426 |
return res.status(200).json({
|
427 |
apiKey: existingUser.key,
|
428 |
createdAt: existingUser.createdAt,
|
|
|
429 |
owner: existingUser.owner
|
430 |
});
|
431 |
}
|
|
|
416 |
|
417 |
const existingUser = await collection.findOne({ owner: userIdNumber });
|
418 |
|
|
|
|
|
|
|
|
|
|
|
|
|
419 |
if (existingUser) {
|
420 |
return res.status(200).json({
|
421 |
apiKey: existingUser.key,
|
422 |
createdAt: existingUser.createdAt,
|
423 |
+
is_banned: existingUser.is_banned || false,
|
424 |
owner: existingUser.owner
|
425 |
});
|
426 |
}
|