fix(user-service): add class-validator decorators to auth DTOs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f87c089ca2
commit
3efce36f92
|
|
@ -6,22 +6,34 @@ import {
|
|||
HttpCode,
|
||||
HttpStatus,
|
||||
} from '@nestjs/common';
|
||||
import { IsString, IsNotEmpty, IsOptional } from 'class-validator';
|
||||
import { AuthService } from './auth.service';
|
||||
|
||||
class CreateAnonymousDto {
|
||||
fingerprint: string;
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
fingerprint?: string;
|
||||
}
|
||||
|
||||
class SendCodeDto {
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
phone: string;
|
||||
}
|
||||
|
||||
class VerifyCodeDto {
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
phone: string;
|
||||
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
code: string;
|
||||
}
|
||||
|
||||
class RefreshTokenDto {
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
token: string;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue