Browse Source
Task/harden endpoint of public access for portfolio sharing (#7205)
* Harden endpoint by restricting to public accesses
* Update changelog
pull/7181/head^2
Thomas Kaul
2 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
5 additions and
1 deletions
-
CHANGELOG.md
-
apps/api/src/app/endpoints/public/public.controller.ts
|
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
|
### Changed |
|
|
### Changed |
|
|
|
|
|
|
|
|
|
|
|
- Hardened the endpoint of the public access for portfolio sharing by restricting it to public accesses |
|
|
- Improved the language localization by translating various tooltips across the application |
|
|
- Improved the language localization by translating various tooltips across the application |
|
|
- Upgraded `yahoo-finance2` from version `3.14.3` to `3.15.4` |
|
|
- Upgraded `yahoo-finance2` from version `3.14.3` to `3.15.4` |
|
|
|
|
|
|
|
|
|
|
|
@ -46,7 +46,10 @@ export class PublicController { |
|
|
public async getPublicPortfolio( |
|
|
public async getPublicPortfolio( |
|
|
@Param('accessId') accessId: string |
|
|
@Param('accessId') accessId: string |
|
|
): Promise<PublicPortfolioResponse> { |
|
|
): Promise<PublicPortfolioResponse> { |
|
|
const access = await this.accessService.access({ id: accessId }); |
|
|
const access = await this.accessService.access({ |
|
|
|
|
|
granteeUserId: null, |
|
|
|
|
|
id: accessId |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
if (!access) { |
|
|
if (!access) { |
|
|
throw new HttpException( |
|
|
throw new HttpException( |
|
|
|