Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

update userinfo

aichy126290ab87d1306
diff --git a/docs/docs.go b/docs/docs.go
index fccfcc1f..cce01432 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -6948,10 +6948,6 @@ const docTemplate = `{
},
"schema.SiteBrandingReq": {
"type": "object",
- "required": [
- "logo",
- "square_icon"
- ],
"properties": {
"favicon": {
"type": "string",
@@ -6973,10 +6969,6 @@ const docTemplate = `{
},
"schema.SiteBrandingResp": {
"type": "object",
- "required": [
- "logo",
- "square_icon"
- ],
"properties": {
"favicon": {
"type": "string",
diff --git a/docs/swagger.json b/docs/swagger.json
index fb471dfa..3503fce7 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -6936,10 +6936,6 @@
},
"schema.SiteBrandingReq": {
"type": "object",
- "required": [
- "logo",
- "square_icon"
- ],
"properties": {
"favicon": {
"type": "string",
@@ -6961,10 +6957,6 @@
},
"schema.SiteBrandingResp": {
"type": "object",
- "required": [
- "logo",
- "square_icon"
- ],
"properties": {
"favicon": {
"type": "string",
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index e3268299..b02e9494 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -1241,9 +1241,6 @@ definitions:
square_icon:
maxLength: 512
type: string
- required:
- - logo
- - square_icon
type: object
schema.SiteBrandingResp:
properties:
@@ -1259,9 +1256,6 @@ definitions:
square_icon:
maxLength: 512
type: string
- required:
- - logo
- - square_icon
type: object
schema.SiteCustomCssHTMLReq:
properties:
diff --git a/internal/schema/user_schema.go b/internal/schema/user_schema.go
index d1712129..9b449b80 100644
--- a/internal/schema/user_schema.go
+++ b/internal/schema/user_schema.go
@@ -228,7 +228,7 @@ type UserEmailLogin struct {
// UserRegisterReq user register request
type UserRegisterReq struct {
// name
- Name string `validate:"required,gt=4,lte=30" json:"name"`
+ Name string `validate:"required,gt=3,lte=30" json:"name"`
// email
Email string `validate:"required,email,gt=0,lte=500" json:"e_mail" `
// password
@@ -277,7 +277,7 @@ type UpdateInfoRequest struct {
// display_name
DisplayName string `validate:"required,gt=0,lte=30" json:"display_name"`
// username
- Username string `validate:"omitempty,gt=0,lte=30" json:"username"`
+ Username string `validate:"omitempty,gt=3,lte=30" json:"username"`
// avatar
Avatar AvatarInfo `json:"avatar"`
// bio