允许创建小于六位的密码

This commit is contained in:
2025-09-30 22:27:38 +08:00
parent 077e866915
commit 65a26b1880
4 changed files with 1 additions and 4 deletions

View File

@@ -1754,7 +1754,6 @@ const docTemplate = `{
"properties": {
"password": {
"type": "string",
"minLength": 6,
"example": "password123"
},
"username": {

View File

@@ -1743,7 +1743,6 @@
"properties": {
"password": {
"type": "string",
"minLength": 6,
"example": "password123"
},
"username": {

View File

@@ -514,7 +514,6 @@ definitions:
properties:
password:
example: password123
minLength: 6
type: string
username:
example: newuser

View File

@@ -36,7 +36,7 @@ func NewController(userRepo repository.UserRepository, auditRepo repository.User
// CreateUserRequest 定义创建用户请求的结构体
type CreateUserRequest struct {
Username string `json:"username" binding:"required" example:"newuser"`
Password string `json:"password" binding:"required,min=6" example:"password123"`
Password string `json:"password" binding:"required" example:"password123"`
}
// LoginRequest 定义登录请求的结构体