enum validation

This commit is contained in:
Philipinho
2026-03-26 00:41:38 +00:00
parent 9125996e97
commit 0e4a1e7419
@@ -1,4 +1,5 @@
import { IsNotEmpty, IsString, IsUUID } from 'class-validator'; import { IsEnum, IsNotEmpty, IsUUID } from 'class-validator';
import { UserRole } from '../../../common/helpers/types/permission';
export class UpdateWorkspaceUserRoleDto { export class UpdateWorkspaceUserRoleDto {
@IsNotEmpty() @IsNotEmpty()
@@ -6,6 +7,6 @@ export class UpdateWorkspaceUserRoleDto {
userId: string; userId: string;
@IsNotEmpty() @IsNotEmpty()
@IsString() @IsEnum(UserRole)
role: string; role: string;
} }