Files
immich/server/src/domain/asset/dto/map-marker.dto.ts
Mert 9539a361e4 fix(server): non-nullable IsOptional (#3939)
* custom `IsOptional`

* added link to source

* formatting

* Update server/src/domain/domain.util.ts

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>

* nullable birth date endpoint

* made `nullable` a property

* formatting

* removed unused dto

* updated decorator arg

* fixed album e2e tests

* add null tests for auth e2e

* add null test for person e2e

* fixed tests

* added null test for user e2e

* removed unusued import

* log key in test name

* chore: add note about mobile not being able to use the endpoint

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
2023-09-01 16:40:00 +00:00

23 lines
484 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { Transform, Type } from 'class-transformer';
import { IsBoolean, IsDate } from 'class-validator';
import { toBoolean, Optional } from '../../domain.util';
export class MapMarkerDto {
@ApiProperty()
@Optional()
@IsBoolean()
@Transform(toBoolean)
isFavorite?: boolean;
@Optional()
@IsDate()
@Type(() => Date)
fileCreatedAfter?: Date;
@Optional()
@IsDate()
@Type(() => Date)
fileCreatedBefore?: Date;
}