mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
refactor(server): more consistent param validation (#2166)
This commit is contained in:
9
server/libs/domain/src/user/dto/user-id.dto.ts
Normal file
9
server/libs/domain/src/user/dto/user-id.dto.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsNotEmpty, IsUUID } from 'class-validator';
|
||||
|
||||
export class UserIdDto {
|
||||
@IsNotEmpty()
|
||||
@IsUUID('4')
|
||||
@ApiProperty({ format: 'uuid' })
|
||||
userId!: string;
|
||||
}
|
||||
Reference in New Issue
Block a user