From e8f67527c7c037ccfebfae945659989bc49c60b5 Mon Sep 17 00:00:00 2001 From: hailin Date: Mon, 23 Feb 2026 22:18:21 -0800 Subject: [PATCH] =?UTF-8?q?fix(auth):=20LoginDto.deviceInfo/ipAddress=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20@IsOptional?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- .../auth-service/src/interface/http/dto/login.dto.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/services/auth-service/src/interface/http/dto/login.dto.ts b/backend/services/auth-service/src/interface/http/dto/login.dto.ts index c9d6f82..72a6db8 100644 --- a/backend/services/auth-service/src/interface/http/dto/login.dto.ts +++ b/backend/services/auth-service/src/interface/http/dto/login.dto.ts @@ -1,4 +1,4 @@ -import { IsString, MinLength } from 'class-validator'; +import { IsString, IsOptional, MinLength } from 'class-validator'; import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export class LoginDto { @@ -12,7 +12,12 @@ export class LoginDto { password: string; @ApiPropertyOptional({ description: 'Device info for token tracking' }) + @IsOptional() @IsString() - @MinLength(0) deviceInfo?: string; + + @ApiPropertyOptional({ description: 'Client IP address' }) + @IsOptional() + @IsString() + ipAddress?: string; }