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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
3 additions and
2 deletions
-
CHANGELOG.md
-
libs/common/src/lib/dtos/create-asset-profile-with-market-data.dto.ts
|
|
@ -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 |
|
|
|
|
|
@ -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; |
|
|
|