This is an automated email from the ASF dual-hosted git repository.
linkinstar pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
The following commit(s) were added to refs/heads/dev by this push:
new e7672c10 fix: administrator add user failure
e7672c10 is described below
commit e7672c109dcd28a65b613c13a94a7e60574a4709
Author: Luffy <[email protected]>
AuthorDate: Fri Nov 29 15:37:31 2024 +0800
fix: administrator add user failure
---
docs/docs.go | 2 +-
docs/swagger.json | 2 +-
docs/swagger.yaml | 2 +-
internal/schema/backyard_user_schema.go | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/docs.go b/docs/docs.go
index 424bd669..9863b0c0 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -7829,7 +7829,7 @@ const docTemplate = `{
"display_name": {
"type": "string",
"maxLength": 30,
- "minLength": 4
+ "minLength": 2
},
"email": {
"type": "string",
diff --git a/docs/swagger.json b/docs/swagger.json
index 7ec493b2..5c2f459c 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -7802,7 +7802,7 @@
"display_name": {
"type": "string",
"maxLength": 30,
- "minLength": 4
+ "minLength": 2
},
"email": {
"type": "string",
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 4622e964..811b3c28 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -270,7 +270,7 @@ definitions:
properties:
display_name:
maxLength: 30
- minLength: 4
+ minLength: 2
type: string
email:
maxLength: 500
diff --git a/internal/schema/backyard_user_schema.go
b/internal/schema/backyard_user_schema.go
index 9f8733b2..7c690aee 100644
--- a/internal/schema/backyard_user_schema.go
+++ b/internal/schema/backyard_user_schema.go
@@ -120,7 +120,7 @@ type EditUserProfileReq struct {
// AddUserReq add user request
type AddUserReq struct {
- DisplayName string `validate:"required,gte=4,lte=30"
json:"display_name"`
+ DisplayName string `validate:"required,gte=2,lte=30"
json:"display_name"`
Email string `validate:"required,email,gt=0,lte=500" json:"email"`
Password string `validate:"required,gte=8,lte=32" json:"password"`
LoginUserID string `json:"-"`