允许创建小于六位的密码
This commit is contained in:
@@ -1754,7 +1754,6 @@ const docTemplate = `{
|
|||||||
"properties": {
|
"properties": {
|
||||||
"password": {
|
"password": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"minLength": 6,
|
|
||||||
"example": "password123"
|
"example": "password123"
|
||||||
},
|
},
|
||||||
"username": {
|
"username": {
|
||||||
|
|||||||
@@ -1743,7 +1743,6 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"password": {
|
"password": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"minLength": 6,
|
|
||||||
"example": "password123"
|
"example": "password123"
|
||||||
},
|
},
|
||||||
"username": {
|
"username": {
|
||||||
|
|||||||
@@ -514,7 +514,6 @@ definitions:
|
|||||||
properties:
|
properties:
|
||||||
password:
|
password:
|
||||||
example: password123
|
example: password123
|
||||||
minLength: 6
|
|
||||||
type: string
|
type: string
|
||||||
username:
|
username:
|
||||||
example: newuser
|
example: newuser
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ func NewController(userRepo repository.UserRepository, auditRepo repository.User
|
|||||||
// CreateUserRequest 定义创建用户请求的结构体
|
// CreateUserRequest 定义创建用户请求的结构体
|
||||||
type CreateUserRequest struct {
|
type CreateUserRequest struct {
|
||||||
Username string `json:"username" binding:"required" example:"newuser"`
|
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 定义登录请求的结构体
|
// LoginRequest 定义登录请求的结构体
|
||||||
|
|||||||
Reference in New Issue
Block a user