mirror of
https://github.com/CaramelFur/Picsur.git
synced 2025-11-14 15:45:49 +01:00
39 lines
561 B
TypeScript
39 lines
561 B
TypeScript
|
|
import {
|
||
|
|
IsBoolean,
|
||
|
|
IsNotEmpty,
|
||
|
|
IsOptional,
|
||
|
|
IsString,
|
||
|
|
ValidateNested,
|
||
|
|
} from 'class-validator';
|
||
|
|
import { User } from 'src/users/user.dto';
|
||
|
|
|
||
|
|
export class LoginResponseDto {
|
||
|
|
@IsString()
|
||
|
|
access_token: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export class RegisterRequestDto {
|
||
|
|
@IsString()
|
||
|
|
@IsNotEmpty()
|
||
|
|
username: string;
|
||
|
|
|
||
|
|
@IsString()
|
||
|
|
@IsNotEmpty()
|
||
|
|
password: string;
|
||
|
|
|
||
|
|
@IsBoolean()
|
||
|
|
@IsOptional()
|
||
|
|
isAdmin?: boolean;
|
||
|
|
}
|
||
|
|
|
||
|
|
export class DeleteRequestDto {
|
||
|
|
@IsString()
|
||
|
|
@IsNotEmpty()
|
||
|
|
username: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export class JwtDataDto {
|
||
|
|
@ValidateNested()
|
||
|
|
user: User;
|
||
|
|
}
|