fix(auth): LoginDto.deviceInfo/ipAddress 添加 @IsOptional
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6d3d45a4fb
commit
e8f67527c7
|
|
@ -1,4 +1,4 @@
|
||||||
import { IsString, MinLength } from 'class-validator';
|
import { IsString, IsOptional, MinLength } from 'class-validator';
|
||||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||||
|
|
||||||
export class LoginDto {
|
export class LoginDto {
|
||||||
|
|
@ -12,7 +12,12 @@ export class LoginDto {
|
||||||
password: string;
|
password: string;
|
||||||
|
|
||||||
@ApiPropertyOptional({ description: 'Device info for token tracking' })
|
@ApiPropertyOptional({ description: 'Device info for token tracking' })
|
||||||
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
@MinLength(0)
|
|
||||||
deviceInfo?: string;
|
deviceInfo?: string;
|
||||||
|
|
||||||
|
@ApiPropertyOptional({ description: 'Client IP address' })
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
ipAddress?: string;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue