feat(web+server): map date filters + small changes (#2565)

This commit is contained in:
Michel Heusschen
2023-05-25 18:47:52 +02:00
committed by GitHub
parent bcc2c34eef
commit 062e2eca6f
18 changed files with 429 additions and 178 deletions

View File

@@ -15,6 +15,8 @@ export interface LivePhotoSearchOptions {
export interface MapMarkerSearchOptions {
isFavorite?: boolean;
fileCreatedBefore?: string;
fileCreatedAfter?: string;
}
export interface MapMarker {

View File

@@ -1,10 +1,22 @@
import { ApiProperty } from '@nestjs/swagger';
import { toBoolean } from 'apps/immich/src/utils/transform.util';
import { Transform } from 'class-transformer';
import { IsBoolean, IsOptional } from 'class-validator';
import { IsBoolean, IsISO8601, IsOptional } from 'class-validator';
export class MapMarkerDto {
@ApiProperty()
@IsOptional()
@IsBoolean()
@Transform(toBoolean)
isFavorite?: boolean;
@ApiProperty({ format: 'date-time' })
@IsOptional()
@IsISO8601({ strict: true, strictSeparator: true })
fileCreatedAfter?: string;
@ApiProperty({ format: 'date-time' })
@IsOptional()
@IsISO8601({ strict: true, strictSeparator: true })
fileCreatedBefore?: string;
}