mirror of https://gitee.com/answerdev/answer.git
feat(user): replace space in username with -
This commit is contained in:
parent
5861eebb78
commit
69f250ee04
|
@ -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 := ""
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package random
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
"math/rand"
|
||||
)
|
||||
|
||||
func UsernameSuffix() string {
|
||||
|
|
Loading…
Reference in New Issue