diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bcb87a7a..2bc6e3d07 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 ### Added diff --git a/apps/api/src/app/portfolio/portfolio.controller.ts b/apps/api/src/app/portfolio/portfolio.controller.ts index 19f48fa86..84d4ef532 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 { 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'; }