mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +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:
parent
753842745d
commit
a50f125dd1
41 changed files with 276 additions and 368 deletions
|
|
@ -1,7 +1,8 @@
|
|||
import { AudioCodec, CQMode, ToneMapping, TranscodeHWAccel, TranscodePolicy, VideoCodec } from '@app/infra/entities';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsBoolean, IsEnum, IsInt, IsString, Max, Min } from 'class-validator';
|
||||
import { IsEnum, IsInt, IsString, Max, Min } from 'class-validator';
|
||||
import { ValidateBoolean } from '../../domain.util';
|
||||
|
||||
export class SystemConfigFFmpegDto {
|
||||
@IsInt()
|
||||
|
|
@ -68,14 +69,14 @@ export class SystemConfigFFmpegDto {
|
|||
@ApiProperty({ type: 'integer' })
|
||||
npl!: number;
|
||||
|
||||
@IsBoolean()
|
||||
@ValidateBoolean()
|
||||
temporalAQ!: boolean;
|
||||
|
||||
@IsEnum(CQMode)
|
||||
@ApiProperty({ enumName: 'CQMode', enum: CQMode })
|
||||
cqMode!: CQMode;
|
||||
|
||||
@IsBoolean()
|
||||
@ValidateBoolean()
|
||||
twoPass!: boolean;
|
||||
|
||||
@IsString()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue