add role api

This commit is contained in:
rubikscraft
2022-03-12 16:25:15 +01:00
parent 0ad444f43b
commit 1febcd8147
14 changed files with 212 additions and 19 deletions

View File

@@ -1,6 +1,6 @@
import { Exclude } from 'class-transformer';
import {
IsArray, IsNotEmpty,
IsArray, IsInt, IsNotEmpty,
IsOptional,
IsString
} from 'class-validator';
@@ -8,9 +8,11 @@ import { Roles } from '../dto/roles.dto';
export class EUser {
@IsOptional()
@IsInt()
id?: number;
@IsNotEmpty()
@IsString()
username: string;
@IsArray()
@@ -19,5 +21,6 @@ export class EUser {
@IsOptional()
@Exclude()
@IsString()
password?: string;
}