nest-project/src/users/dto/token.dto.ts

20 lines
345 B
TypeScript
Raw Normal View History

2023-02-16 01:18:55 +08:00
import '@nestjs/mapped-types'
2023-02-16 10:40:03 +08:00
import { ApiProperty } from '@nestjs/swagger'
2023-02-17 15:56:35 +08:00
import { IsString } from 'class-validator'
2023-02-16 01:18:55 +08:00
export class Token {
@ApiProperty()
accessToken: string
@ApiProperty()
refreshToken: string
}
2023-02-20 16:25:46 +08:00
export class TokenRefreshPayload {
2023-02-17 15:56:35 +08:00
@IsString()
refreshToken: string
}
export class TokenPayload {
userId: string
}