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
parent
commit
b371318c78
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      apps/api/src/app/endpoints/market-data/market-data.controller.ts

4
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
); );
} }

Loading…
Cancel
Save