mirror of
https://github.com/Art051/immich.git
synced 2025-08-11 19:29:00 +00:00
refactor: api validators (boolean and date) (#7709)
* refactor: api validators (boolean and date) * chore: open api * revert: time bucket change
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsBoolean, IsEnum, IsNotEmpty } from 'class-validator';
|
||||
import { Optional } from '../domain.util';
|
||||
import { IsEnum, IsNotEmpty } from 'class-validator';
|
||||
import { ValidateBoolean } from '../domain.util';
|
||||
import { JobCommand, QueueName } from './job.constants';
|
||||
|
||||
export class JobIdParamDto {
|
||||
@@ -16,8 +16,7 @@ export class JobCommandDto {
|
||||
@ApiProperty({ type: 'string', enum: JobCommand, enumName: 'JobCommand' })
|
||||
command!: JobCommand;
|
||||
|
||||
@Optional()
|
||||
@IsBoolean()
|
||||
@ValidateBoolean({ optional: true })
|
||||
force!: boolean;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user