Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
translation-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinmingyuan
translation-server
Commits
62bd095c
Commit
62bd095c
authored
Jan 19, 2025
by
mingyard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:限制翻译字符长度
parent
ac81a9b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
auth.service.ts
src/controller/auth/auth.service.ts
+1
-1
translateReq.dto.ts
src/controller/translate/dto/req/translateReq.dto.ts
+2
-1
No files found.
src/controller/auth/auth.service.ts
View file @
62bd095c
...
...
@@ -141,7 +141,7 @@ export class AuthService {
return
user
;
}
throw
UnauthorizedError
.
default
(
'
用户名
或密码错误'
);
throw
UnauthorizedError
.
default
(
'
账号
或密码错误'
);
}
// 更新用户登录时间
...
...
src/controller/translate/dto/req/translateReq.dto.ts
View file @
62bd095c
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
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment