mirror of https://gitee.com/answerdev/answer.git
Merge branch 'ai_fix_user_avatar' into 'main'
fix user avatar Unmarshal See merge request opensource/answer!150
This commit is contained in:
commit
2f277921bb
|
@ -96,10 +96,8 @@ func (r *GetUserToSetShowResp) GetFromUserEntity(userInfo *entity.User) {
|
|||
r.Status = statusShow
|
||||
}
|
||||
avatarInfo := &AvatarInfo{}
|
||||
err := json.Unmarshal([]byte(userInfo.Avatar), avatarInfo)
|
||||
if err != nil {
|
||||
log.Error("AvatarInfo json.Unmarshal Error", err)
|
||||
}
|
||||
_ = json.Unmarshal([]byte(userInfo.Avatar), avatarInfo)
|
||||
// if json.Unmarshal Error avatarInfo.Type is Empty
|
||||
r.Avatar = avatarInfo
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue