diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 76f33380..2e629696 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -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' }); } });