feat(user): replace space in username with -

This commit is contained in:
LinkinStars 2023-07-06 16:18:57 +08:00
parent 5861eebb78
commit 69f250ee04
2 changed files with 2 additions and 2 deletions

View File

@ -151,7 +151,7 @@ func (us *UserCommon) MakeUsername(ctx context.Context, displayName string) (use
}
}
username = strings.ReplaceAll(displayName, " ", "_")
username = strings.ReplaceAll(displayName, " ", "-")
username = strings.ToLower(username)
suffix := ""

View File

@ -1,8 +1,8 @@
package random
import (
"crypto/rand"
"encoding/hex"
"math/rand"
)
func UsernameSuffix() string {