diff --git a/angular/RestClient/package-lock.json b/angular/RestClient/package-lock.json index af241069cc8acddc06a48c70b6d1dd25125a07ac..59ed6c568bebf6083a5d83e2f9e248ac7cbfe5c8 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 a17778b07370cfdb71c9dcc5f6137b413ab929cf..80e1bb768bfe124583646d9fc3e643c4813d66eb 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 3f5675928f759d5fc64148faa342e48fae5ed7fe..ea460cdfac612b165b7f944967472da25f7a6cca 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 651356867af69ca2928b74c4d0f1b43bbf43a683..1d6faf67844291cbf4eaa659357b2a85bead22ff 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 a9915d12a1059fbdaf23b45d29da012625d595ec..27e99150c7a58f272a3099a5b5fe98f31f2c901f 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`, };