enum validation
This commit is contained in:
parent
9125996e97
commit
0e4a1e7419
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue