Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Bugfix/fix public page for non existent access (#3604)
Thomas Kauldd15bba35954
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 0bcb87a7ab..2bc6e3d070 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- Upgraded `angular` from version `18.0.4` to `18.1.1`- Upgraded `Nx` from version `19.4.3` to `19.5.1`+### Fixed++- Fixed an issue in the public page related to a non-existent access+## 2.97.0 - 2024-07-20### Addeddiff --git a/apps/api/src/app/portfolio/portfolio.controller.ts b/apps/api/src/app/portfolio/portfolio.controller.tsindex 19f48fa863..84d4ef5323 100644--- a/apps/api/src/app/portfolio/portfolio.controller.ts+++ b/apps/api/src/app/portfolio/portfolio.controller.ts@@ -496,9 +496,6 @@ export class PortfolioController {@Param('accessId') accessId): Promise<PortfolioPublicDetails> {const access = await this.accessService.access({ id: accessId });- const user = await this.userService.user({- id: access.userId- });if (!access) {throw new HttpException(@@ -508,6 +505,11 @@ export class PortfolioController {}let hasDetails = true;++ const user = await this.userService.user({+ id: access.userId+ });+if (this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION')) {hasDetails = user.subscription.type === 'Premium';}