diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 65446cae..76f33380 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -41,7 +41,6 @@ app.post('/login', async (req, res) => { try { // Forward the login request to the authentication service const authResponse = await axios.post(authServiceUrl+'/login', req.body); - console.error("RESPONSE GATEWAY... "+authResponse);//borrar res.json(authResponse.data); } catch (error) { res.status(error.response.status).json({ error: error.response.data.error }); diff --git a/gatewayservice/gateway-service.test.js b/gatewayservice/gateway-service.test.js index a63c2527..6df69c6b 100644 --- a/gatewayservice/gateway-service.test.js +++ b/gatewayservice/gateway-service.test.js @@ -12,6 +12,7 @@ describe('Gateway Service', () => { // Mock responses from external services axios.post.mockImplementation((url, data) => { if (url.endsWith('/login')) { + console.error("en gateway tests estamos"); // borrar return Promise.resolve({ data: { token: 'mockedToken' } }); } else if (url.endsWith('/adduser')) { return Promise.resolve({ data: { userId: 'mockedUserId' } }); diff --git a/webapp/src/components/Login.test.js b/webapp/src/components/Login.test.js index 0ebbc08f..3d6685e7 100644 --- a/webapp/src/components/Login.test.js +++ b/webapp/src/components/Login.test.js @@ -24,7 +24,7 @@ describe('Login Component', () => { axios.post.mockImplementation((url, data) => { if (url.endsWith('/login')) { console.error("En login estamos manejandonos con el mock de axios"); //borrar - return Promise.resolve({ data: { token: 'mockedToken' } }); + return Promise.resolve({ data: { createdAt: 'mockedToken' } }); }else if (url.endsWith('/createUserRank')) { return Promise.resolve({ data: { rankId: 'mockedRankId' } }); }