Commit 62bd095c authored by mingyard's avatar mingyard

feat:限制翻译字符长度

parent ac81a9b7
......@@ -141,7 +141,7 @@ export class AuthService {
return user;
}
throw UnauthorizedError.default('用户名或密码错误');
throw UnauthorizedError.default('账号或密码错误');
}
// 更新用户登录时间
......
import { SupportLanguages } from '@/common/utils/constants';
import { ApiProperty } from '@nestjs/swagger';
import { Expose } from 'class-transformer';
import { IsEnum, IsNotEmpty, IsString } from 'class-validator';
import { IsEnum, IsNotEmpty, IsString, Length } from 'class-validator';
export class TranslateReqDto {
@ApiProperty({
......@@ -32,5 +32,6 @@ export class TranslateReqDto {
@Expose()
@IsNotEmpty()
@IsString()
@Length(1, 200)
text: string;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment