From 6bb7f7bef57332c184907f025c11eb45fa5ef4e5 Mon Sep 17 00:00:00 2001 From: Hugo <hugo.cubino@estudiantes.uva.es> Date: Sun, 15 Dec 2024 13:21:12 +0100 Subject: [PATCH] cambiados puertos --- angular/RestClient/package-lock.json | 50 +++++++++++-------- angular/RestClient/package.json | 2 +- .../src/app/shared/session.service.ts | 4 +- .../src/environments/environment.monolith.ts | 2 +- .../src/environments/environment.ts | 6 +-- 5 files changed, 37 insertions(+), 27 deletions(-) diff --git a/angular/RestClient/package-lock.json b/angular/RestClient/package-lock.json index af24106..59ed6c5 100644 --- a/angular/RestClient/package-lock.json +++ b/angular/RestClient/package-lock.json @@ -22,7 +22,7 @@ "@angular/ssr": "^18.2.7", "@ng-bootstrap/ng-bootstrap": "^17.0.1", "@popperjs/core": "^2.11.8", - "bootstrap": "^3.4.0", + "bootstrap": "^5.3.3", "express": "^4.18.2", "jquery": "^3.4.1", "jwt-decode": "^4.0.0", @@ -5469,12 +5469,21 @@ "license": "ISC" }, "node_modules/bootstrap": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.4.1.tgz", - "integrity": "sha512-yN5oZVmRCwe5aKwzRj6736nSmKDX7pLYwsXiCj/EYmo16hODaBiT4En5btW/jhBF/seV+XMx3aYwukYC3A49DA==", - "license": "MIT", - "engines": { - "node": ">=6" + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz", + "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "peerDependencies": { + "@popperjs/core": "^2.11.8" } }, "node_modules/brace-expansion": { @@ -7134,10 +7143,9 @@ "license": "Apache-2.0" }, "node_modules/express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", - "license": "MIT", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -7158,7 +7166,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -7173,6 +7181,10 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/debug": { @@ -9927,16 +9939,15 @@ } }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -10815,10 +10826,9 @@ "license": "ISC" }, "node_modules/path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", - "license": "MIT" + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" }, "node_modules/path-type": { "version": "5.0.0", diff --git a/angular/RestClient/package.json b/angular/RestClient/package.json index a17778b..80e1bb7 100644 --- a/angular/RestClient/package.json +++ b/angular/RestClient/package.json @@ -25,7 +25,7 @@ "@angular/ssr": "^18.2.7", "@ng-bootstrap/ng-bootstrap": "^17.0.1", "@popperjs/core": "^2.11.8", - "bootstrap": "^3.4.0", + "bootstrap": "^5.3.3", "express": "^4.18.2", "jquery": "^3.4.1", "jwt-decode": "^4.0.0", diff --git a/angular/RestClient/src/app/shared/session.service.ts b/angular/RestClient/src/app/shared/session.service.ts index 3f56759..ea460cd 100644 --- a/angular/RestClient/src/app/shared/session.service.ts +++ b/angular/RestClient/src/app/shared/session.service.ts @@ -41,10 +41,10 @@ export class SessionService { private setSession(resp: any) { const decoded = jwtDecode<JWTDecoded>(resp.token); - const user: User = { ...decoded, id: decoded.userId }; + const user: Session = { ...decoded, id: decoded.userId }; this.session$.next(user); this.storage.save(this.tokenKey, { ...resp, session: user }); - const mainPage = this.getMainPage(decoded.user.rol as UserRol); + const mainPage = this.getMainPage(user.rol as UserRol); return { ...resp, mainPage }; } diff --git a/angular/RestClient/src/environments/environment.monolith.ts b/angular/RestClient/src/environments/environment.monolith.ts index 6513568..1d6faf6 100644 --- a/angular/RestClient/src/environments/environment.monolith.ts +++ b/angular/RestClient/src/environments/environment.monolith.ts @@ -2,7 +2,7 @@ const monolith = 'localhost:8080'; // kong export const environment = { production: false, - authAPI: `http://localhost:8101/auth`, + authAPI: `http://localhost:8101`, userAPI: `http://${monolith}/users`, hotelAPI: `http://${monolith}/hotels`, bookingAPI: `http://${monolith}/bookings`, diff --git a/angular/RestClient/src/environments/environment.ts b/angular/RestClient/src/environments/environment.ts index a9915d1..27e9915 100644 --- a/angular/RestClient/src/environments/environment.ts +++ b/angular/RestClient/src/environments/environment.ts @@ -2,7 +2,7 @@ const developmentHost = 'localhost'; export const environment = { production: false, authAPI: `http://${developmentHost}:8101`, - userAPI: `http://${developmentHost}:8201`, - hotelAPI: `http://${developmentHost}:8301`, - bookingAPI: `http://${developmentHost}:8401`, + userAPI: `http://${developmentHost}:8080/users`, + hotelAPI: `http://${developmentHost}:8080/hotels`, + bookingAPI: `http://${developmentHost}:8080/bookings`, }; -- GitLab