mirror of
https://gitlab.com/foxixus/neomovies-api.git
synced 2025-10-28 09:58:50 +05:00
fix db close leak
This commit is contained in:
@@ -186,8 +186,6 @@ router.post('/login', async (req, res) => {
|
||||
}
|
||||
const valid = await bcrypt.compare(password, user.password);
|
||||
if (!valid) return res.status(400).json({ error: 'Invalid password' });
|
||||
|
||||
|
||||
const payload = {
|
||||
id: user._id.toString(),
|
||||
email: user.email,
|
||||
|
||||
Reference in New Issue
Block a user