We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 72476e2 + a30ded5 commit c203143Copy full SHA for c203143
1 file changed
routes/auth.js
@@ -26,7 +26,7 @@ router.post('/login', async (req, res) => {
26
try {
27
const { username, password } = req.body;
28
29
- const user = await User.findOne({ username });
+ const user = await User.findOne({ username: { $eq: username } });
30
if (!user) {
31
return res.status(400).json({ message: 'User not found' });
32
}
0 commit comments