From e60f418ec90be47ba3533c426ca256e815d09ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Cadenas?= Date: Sun, 7 May 2023 23:33:31 +0200 Subject: [PATCH] Hotfix 3 --- docker-compose-deploy.yml | 2 +- docker-compose.yml | 2 +- restapi/index.ts | 2 +- restapi/tests/api.test.ts | 12 +++++++----- webapp/src/axios.ts | 2 +- webapp/src/pages/login/Login.tsx | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/docker-compose-deploy.yml b/docker-compose-deploy.yml index 904dd67..dca9611 100644 --- a/docker-compose-deploy.yml +++ b/docker-compose-deploy.yml @@ -7,6 +7,6 @@ services: webapp: image: ghcr.io/arquisoft/lomap_en2b/webapp:latest ports: - - "3000:3000" + - "443:443" depends_on: - restapi \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 08701e1..d827ee7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: restapi: build: ./restapi ports: - - "8800:8800" + - "443:443" webapp: build: ./webapp ports: diff --git a/restapi/index.ts b/restapi/index.ts index f7fd6eb..cfaff8d 100644 --- a/restapi/index.ts +++ b/restapi/index.ts @@ -35,7 +35,7 @@ mongoose.connect("mongodb+srv://asw2b:asw2b@lomap.9zrwedt.mongodb.net/?retryWrit ); -app.use(cors({origin:"https://172.162.240.176:3000"})) +app.use(cors({origin:"https://172.162.240.176"})) app.use(cookieParser()); diff --git a/restapi/tests/api.test.ts b/restapi/tests/api.test.ts index 61cf86d..9141087 100644 --- a/restapi/tests/api.test.ts +++ b/restapi/tests/api.test.ts @@ -36,10 +36,7 @@ beforeAll(async () => { mongoose.connect(connectionString); }); -afterAll(async () => { - server.close() //close the server - mongoose.connection.close(); -}) + describe('user ', () => { @@ -155,4 +152,9 @@ describe('user ', () => { const response:Response = await request(app).get("/solid/pepe/friends"); expect(response.statusCode).toBe(500); }); -}); \ No newline at end of file +}); + +afterAll(async () => { + server.close() //close the server + mongoose.connection.close(); +}) \ No newline at end of file diff --git a/webapp/src/axios.ts b/webapp/src/axios.ts index 4067d60..7844749 100644 --- a/webapp/src/axios.ts +++ b/webapp/src/axios.ts @@ -1,5 +1,5 @@ import axios from "axios"; export const makeRequest = axios.create({ - baseURL: "https://172.162.240.176:8800" + baseURL: "http://172.162.240.176:8800" }); \ No newline at end of file diff --git a/webapp/src/pages/login/Login.tsx b/webapp/src/pages/login/Login.tsx index 2b4104f..af95ee8 100644 --- a/webapp/src/pages/login/Login.tsx +++ b/webapp/src/pages/login/Login.tsx @@ -28,7 +28,7 @@ const Login = () => { InputProps={{ endAdornment: (