mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
feat: sub-pages for integrity reports
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IsEnum } from 'class-validator';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IntegrityReportType, MaintenanceAction } from 'src/enum';
|
||||
import { ValidateEnum, ValidateString } from 'src/validation';
|
||||
|
||||
@@ -16,7 +16,19 @@ export class MaintenanceAuthDto {
|
||||
username!: string;
|
||||
}
|
||||
|
||||
export class MaintenanceIntegrityReportSummaryResponseDto {
|
||||
@ApiProperty({ type: 'integer' })
|
||||
[IntegrityReportType.ChecksumFail]!: number;
|
||||
@ApiProperty({ type: 'integer' })
|
||||
[IntegrityReportType.MissingFile]!: number;
|
||||
@ApiProperty({ type: 'integer' })
|
||||
[IntegrityReportType.OrphanFile]!: number;
|
||||
}
|
||||
|
||||
export class MaintenanceGetIntegrityReportDto {
|
||||
@ValidateEnum({ enum: IntegrityReportType, name: 'IntegrityReportType' })
|
||||
type!: IntegrityReportType;
|
||||
|
||||
// todo: paginate
|
||||
// @IsInt()
|
||||
// @Min(1)
|
||||
@@ -27,7 +39,7 @@ export class MaintenanceGetIntegrityReportDto {
|
||||
|
||||
class MaintenanceIntegrityReportDto {
|
||||
id!: string;
|
||||
@IsEnum(IntegrityReportType)
|
||||
@ValidateEnum({ enum: IntegrityReportType, name: 'IntegrityReportType' })
|
||||
type!: IntegrityReportType;
|
||||
path!: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user