mirror of
https://github.com/CaramelFur/Picsur.git
synced 2025-11-13 15:25:39 +01:00
add role api
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user