Browse Source

Bugfix/data source validation of create asset profile with market data DTO (#7173)

* Fix data source validation

* Update changelog
pull/7159/head
Akash Negi 2 weeks ago
committed by GitHub
parent
commit
e9007f301c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 4
      libs/common/src/lib/dtos/create-asset-profile-with-market-data.dto.ts

1
CHANGELOG.md

@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Fixed the validation of the data source field of an asset profile with market data
- Fixed a recurring issue where single-value fields were incorrectly validated as arrays in various endpoints - Fixed a recurring issue where single-value fields were incorrectly validated as arrays in various endpoints
## 3.18.0 - 2026-06-28 ## 3.18.0 - 2026-06-28

4
libs/common/src/lib/dtos/create-asset-profile-with-market-data.dto.ts

@ -1,12 +1,12 @@
import { MarketData } from '@ghostfolio/common/interfaces'; import { MarketData } from '@ghostfolio/common/interfaces';
import { DataSource } from '@prisma/client'; import { DataSource } from '@prisma/client';
import { IsArray, IsEnum, IsOptional } from 'class-validator'; import { IsArray, IsIn, IsOptional } from 'class-validator';
import { CreateAssetProfileDto } from './create-asset-profile.dto'; import { CreateAssetProfileDto } from './create-asset-profile.dto';
export class CreateAssetProfileWithMarketDataDto extends CreateAssetProfileDto { export class CreateAssetProfileWithMarketDataDto extends CreateAssetProfileDto {
@IsEnum([DataSource.MANUAL], { @IsIn([DataSource.MANUAL], {
message: `dataSource must be '${DataSource.MANUAL}'` message: `dataSource must be '${DataSource.MANUAL}'`
}) })
dataSource: DataSource; dataSource: DataSource;

Loading…
Cancel
Save