Paradox Tech
1 day ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
1 deletions
-
apps/api/src/app/portfolio/get-performance.dto.ts
|
|
|
@ -1,9 +1,13 @@ |
|
|
|
import { DateRangeFilterDto } from '@ghostfolio/api/dtos/date-range-filter.dto'; |
|
|
|
|
|
|
|
import { Transform, TransformFnParams } from 'class-transformer'; |
|
|
|
import { IsBoolean } from 'class-validator'; |
|
|
|
import { IsBoolean, IsIn, IsOptional } from 'class-validator'; |
|
|
|
|
|
|
|
export class GetPerformanceDto extends DateRangeFilterDto { |
|
|
|
@IsIn(['year']) |
|
|
|
@IsOptional() |
|
|
|
groupBy?: 'year'; |
|
|
|
|
|
|
|
@IsBoolean() |
|
|
|
@Transform(({ value }: TransformFnParams) => { |
|
|
|
return value === 'true'; |
|
|
|
|