Browse Source

Fix exception with currencies

pull/4813/head
Thomas Kaul 3 months ago
parent
commit
a792644c01
  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

@ -85,7 +85,7 @@ export class MarketDataController {
{ dataSource, symbol }
]);
if (!assetProfile) {
if (!assetProfile && !isCurrency(getCurrencyFromSymbol(symbol))) {
throw new HttpException(
getReasonPhrase(StatusCodes.NOT_FOUND),
StatusCodes.NOT_FOUND
@ -103,7 +103,7 @@ export class MarketDataController {
);
const canUpsertOwnAssetProfile =
assetProfile.userId === this.request.user.id &&
assetProfile?.userId === this.request.user.id &&
hasPermission(
this.request.user.permissions,
permissions.createMarketDataOfOwnAssetProfile

Loading…
Cancel
Save