Browse Source
Bugfix/add missing guards to getMarketDataBySymbol() in market data controller (#6958)
Add missing guards
pull/4198/merge
Thomas Kaul
4 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
-
apps/api/src/app/endpoints/market-data/market-data.controller.ts
|
|
@ -120,10 +120,10 @@ export class MarketDataController { |
|
|
|
|
|
|
|
|
if (!canReadAllAssetProfiles && !canReadOwnAssetProfile) { |
|
|
if (!canReadAllAssetProfiles && !canReadOwnAssetProfile) { |
|
|
throw new HttpException( |
|
|
throw new HttpException( |
|
|
assetProfile.userId |
|
|
assetProfile?.userId |
|
|
? getReasonPhrase(StatusCodes.NOT_FOUND) |
|
|
? getReasonPhrase(StatusCodes.NOT_FOUND) |
|
|
: getReasonPhrase(StatusCodes.FORBIDDEN), |
|
|
: getReasonPhrase(StatusCodes.FORBIDDEN), |
|
|
assetProfile.userId ? StatusCodes.NOT_FOUND : StatusCodes.FORBIDDEN |
|
|
assetProfile?.userId ? StatusCodes.NOT_FOUND : StatusCodes.FORBIDDEN |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|