From 65a26b18804c734e78051078c0913eb599ef4036 Mon Sep 17 00:00:00 2001 From: huang <1724659546@qq.com> Date: Tue, 30 Sep 2025 22:27:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8=E5=88=9B=E5=BB=BA=E5=B0=8F?= =?UTF-8?q?=E4=BA=8E=E5=85=AD=E4=BD=8D=E7=9A=84=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs.go | 1 - docs/swagger.json | 1 - docs/swagger.yaml | 1 - internal/app/controller/user/user_controller.go | 2 +- 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 2116d75..f03b544 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1754,7 +1754,6 @@ const docTemplate = `{ "properties": { "password": { "type": "string", - "minLength": 6, "example": "password123" }, "username": { diff --git a/docs/swagger.json b/docs/swagger.json index 1a18dfe..080e250 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1743,7 +1743,6 @@ "properties": { "password": { "type": "string", - "minLength": 6, "example": "password123" }, "username": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 25c09d9..a17b732 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -514,7 +514,6 @@ definitions: properties: password: example: password123 - minLength: 6 type: string username: example: newuser diff --git a/internal/app/controller/user/user_controller.go b/internal/app/controller/user/user_controller.go index 2fcaebb..1f84e68 100644 --- a/internal/app/controller/user/user_controller.go +++ b/internal/app/controller/user/user_controller.go @@ -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 定义登录请求的结构体