Skip to content

Commit

Permalink
Especificada variable query
Browse files Browse the repository at this point in the history
  • Loading branch information
uo289432 committed Apr 10, 2024
1 parent ebbd509 commit ba0f97d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions userservice/userservice/user-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ app.post('/adduser', async (req, res) => {
app.get('/updateStats', async (req,res) => {
const { username, numRespuestasCorrectas, numRespuestasIncorrectas} = req.query;
try {
query = { username: username.toString() };
let query = { username: username.toString() };
const user = await User.findOne(query);
if (!user) {
return res.status(404).json({ success: false, message: 'Usuario no encontrado' });
Expand All @@ -66,7 +66,7 @@ app.get('/updateStats', async (req,res) => {

app.get('/getUserData', async (req, res) => {
const { username } = req.query;
query = { username: username.toString() };
let query = { username: username.toString() };
try {
const user = await User.findOne(query);
if (!user) {
Expand Down

0 comments on commit ba0f97d

Please sign in to comment.