Skip to content

Commit

Permalink
Register arreglado, ya funciona al crear una cuenta
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianSantamarina committed Mar 13, 2024
1 parent b0b7adc commit 0bae4a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion users/userservice/user-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ app.post('/adduser', async (req, res) => {
// Encrypt the password before saving it
const hashedPassword = await bcrypt.hash(req.body.password, 10);

const user = await User.findOne({ username });
const user = await User.findOne({ username: req.body.username });
if (user) {
res.status(401).json({ error: error.message });
}else{
Expand Down

0 comments on commit 0bae4a3

Please sign in to comment.