mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
enum validation
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user