Skip to content

Commit

Permalink
Nuevo intento de arreglo de seguridad
Browse files Browse the repository at this point in the history
  • Loading branch information
uo277310 committed Apr 29, 2024
1 parent 79dbcfd commit 1ef1c9d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions gatewayservice/gateway-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,11 @@ app.get('/getAllGeneratedQuestions', async (req, res) => {

app.get('/getRecords/:userId', async (req, res) => {
try {

const userId = req.params.userId;

const userId = encodeURIComponent(req.params.userId);
const recordsResponse = await axios.get(`${recordServiceUrl}/getRecords/${userId}`);
res.json(recordsResponse.data);
} catch (error) {
res.status(500).json({ error: 'Error interno del servidor' });
res.status(500).json({ error: 'Error interno del servidor' });
}
});

Expand Down

0 comments on commit 1ef1c9d

Please sign in to comment.