mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix(server): accept showAt and hideAt for creating memories (#26429)
* fix(server): accept showAt and hideAt for creating memories * fix history
This commit is contained in:
@@ -2,6 +2,7 @@ import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsInt, IsObject, IsPositive, ValidateNested } from 'class-validator';
|
||||
import { Memory } from 'src/database';
|
||||
import { HistoryBuilder } from 'src/decorators';
|
||||
import { AssetResponseDto, mapAsset } from 'src/dtos/asset-response.dto';
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
import { AssetOrderWithRandom, MemoryType } from 'src/enum';
|
||||
@@ -77,6 +78,20 @@ export class MemoryCreateDto extends MemoryBaseDto {
|
||||
@ValidateDate({ description: 'Memory date' })
|
||||
memoryAt!: Date;
|
||||
|
||||
@ValidateDate({
|
||||
optional: true,
|
||||
description: 'Date when memory should be shown',
|
||||
history: new HistoryBuilder().added('v2.6.0').stable('v2.6.0'),
|
||||
})
|
||||
showAt?: Date;
|
||||
|
||||
@ValidateDate({
|
||||
optional: true,
|
||||
description: 'Date when memory should be hidden',
|
||||
history: new HistoryBuilder().added('v2.6.0').stable('v2.6.0'),
|
||||
})
|
||||
hideAt?: Date;
|
||||
|
||||
@ValidateUUID({ optional: true, each: true, description: 'Asset IDs to associate with memory' })
|
||||
assetIds?: string[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user