mirror of
https://github.com/n08i40k/schedule-parser-next.git
synced 2025-12-06 09:47:46 +03:00
1.0.0
This commit is contained in:
22
src/dto/auth.dto.ts
Normal file
22
src/dto/auth.dto.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { ApiProperty, PickType } from "@nestjs/swagger";
|
||||
import { UserDto } from "./user.dto";
|
||||
import { IsString } from "class-validator";
|
||||
|
||||
export class SignInDto extends PickType(UserDto, ["username"]) {
|
||||
@ApiProperty({ description: "Пароль в исходном виде" })
|
||||
@IsString()
|
||||
password: string;
|
||||
}
|
||||
|
||||
export class SignInResultDto extends PickType(UserDto, [
|
||||
"id",
|
||||
"access_token",
|
||||
]) {}
|
||||
|
||||
export class SignUpDto extends SignInDto {}
|
||||
|
||||
export class SignUpResultDto extends SignInResultDto {}
|
||||
|
||||
export class UpdateTokenDto extends PickType(UserDto, ["access_token"]) {}
|
||||
|
||||
export class UpdateTokenResultDto extends UpdateTokenDto {}
|
||||
Reference in New Issue
Block a user