🐛 Fix user nick condtion doesn't match registering

This commit is contained in:
LittleSheep 2024-07-27 23:29:10 +08:00
parent c458123d9e
commit ebbfd7450c
2 changed files with 4 additions and 7 deletions

9
.idea/workspace.xml generated
View File

@ -4,11 +4,8 @@
<option name="autoReloadType" value="ALL" />
</component>
<component name="ChangeListManager">
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":sparkles: Default user group">
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":bug: Fix permissions in groups">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pkg/internal/server/api/accounts_api.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/server/api/accounts_api.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pkg/internal/server/api/userinfo_api.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/server/api/userinfo_api.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pkg/internal/services/account_groups.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/account_groups.go" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -155,7 +152,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value=":recycle: Improve notify API" />
<MESSAGE value=":sparkles: Reset password APIs" />
<MESSAGE value=":sparkles: Password reset &amp; user lookup API" />
<MESSAGE value=":recycle: Optimized the initial permission system" />
@ -180,7 +176,8 @@
<MESSAGE value=":bug: Fix push notification to wrong person" />
<MESSAGE value=":sparkles: Account groups" />
<MESSAGE value=":sparkles: Default user group" />
<option name="LAST_COMMIT_MESSAGE" value=":sparkles: Default user group" />
<MESSAGE value=":bug: Fix permissions in groups" />
<option name="LAST_COMMIT_MESSAGE" value=":bug: Fix permissions in groups" />
</component>
<component name="VgoProject">
<settings-migrated>true</settings-migrated>

View File

@ -104,7 +104,7 @@ func editUserinfo(c *fiber.Ctx) error {
user := c.Locals("user").(models.Account)
var data struct {
Nick string `json:"nick" validate:"required,min=4,max=24"`
Nick string `json:"nick" validate:"required,min=2,max=24"`
Description string `json:"description"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`