From d874d07d78abb0f4ebc448f82f5f02a10ac2057f Mon Sep 17 00:00:00 2001 From: CANCI0 Date: Thu, 25 Apr 2024 18:05:43 +0200 Subject: [PATCH 1/2] Removing sonar issues --- gatewayservice/gateway-service.js | 4 ++-- webapp/src/pages/WrongRoute/WrongRoute.test.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 7e788f7c..581468c4 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -28,7 +28,7 @@ app.get("/health", (req, res) => { res.json({ status: "OK" }); }); -returnError = (res, error) => { +var returnError = (res, error) => { console.log(error); res.status(error.response.status).json({ error: error.response.data.error }); } @@ -246,7 +246,7 @@ app.get("/ranking", async (req, res) => { } }); -openapiPath='./openapi.yaml' +var openapiPath='./openapi.yaml' if (fs.existsSync(openapiPath)) { const file = fs.readFileSync(openapiPath, 'utf8'); diff --git a/webapp/src/pages/WrongRoute/WrongRoute.test.js b/webapp/src/pages/WrongRoute/WrongRoute.test.js index 26a83963..efd0dd2c 100644 --- a/webapp/src/pages/WrongRoute/WrongRoute.test.js +++ b/webapp/src/pages/WrongRoute/WrongRoute.test.js @@ -13,7 +13,7 @@ test("renders 404 message", () => { ); - const errorMessage = screen.getByText(/404/i); + expect(getByText("404")).toBeInTheDocument(); expect(getByText("Página no encontrada")).toBeInTheDocument(); expect( From 28a16982b58dee1c7b621e185120cd9359de660a Mon Sep 17 00:00:00 2001 From: CANCI0 Date: Thu, 25 Apr 2024 18:11:09 +0200 Subject: [PATCH 2/2] =?UTF-8?q?M=C3=A1s=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webapp/src/pages/Social/GroupDetails.js | 2 +- webapp/src/pages/Social/UsersPage.js | 2 +- webapp/src/pages/WrongRoute/WrongRoute.js | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/webapp/src/pages/Social/GroupDetails.js b/webapp/src/pages/Social/GroupDetails.js index 1bbb1cdd..6fe53210 100644 --- a/webapp/src/pages/Social/GroupDetails.js +++ b/webapp/src/pages/Social/GroupDetails.js @@ -124,7 +124,7 @@ const GroupDetails = () => { {group.members.map((member, index) => ( - + { {users.map((user, index) => ( - + diff --git a/webapp/src/pages/WrongRoute/WrongRoute.js b/webapp/src/pages/WrongRoute/WrongRoute.js index ecd71dbf..214a095b 100644 --- a/webapp/src/pages/WrongRoute/WrongRoute.js +++ b/webapp/src/pages/WrongRoute/WrongRoute.js @@ -7,15 +7,15 @@ const WrongRoute = () => { const { t } = useTranslation(); return ( -
-
+
+
-
-
+
+

404

{t('pages.wrongroute.title')}