mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-09 18:53:43 +08:00
feat: add nickname field for user
This commit is contained in:
@@ -95,6 +95,7 @@ func (h *UserHandler) Register(c *gin.Context) {
|
||||
salt := utils.RandString(8)
|
||||
user := model.User{
|
||||
Password: utils.GenPassword(data.Password, salt),
|
||||
Nickname: fmt.Sprintf("极客学长@%d", utils.RandomNumber(6)),
|
||||
Avatar: "/images/avatar/user.png",
|
||||
Salt: salt,
|
||||
Status: true,
|
||||
@@ -256,6 +257,7 @@ func (h *UserHandler) Session(c *gin.Context) {
|
||||
|
||||
type userProfile struct {
|
||||
Id uint `json:"id"`
|
||||
Nickname string `json:"nickname"`
|
||||
Mobile string `json:"mobile"`
|
||||
Avatar string `json:"avatar"`
|
||||
ChatConfig types.UserChatConfig `json:"chat_config"`
|
||||
|
||||
Reference in New Issue
Block a user