Merge branch 'ai_update_user_avatar' into 'main'

fix userlist update  avatar

See merge request opensource/answer!134
This commit is contained in:
linkinstar 2022-10-31 08:27:44 +00:00
commit bb2c4c8ff1
1 changed files with 2 additions and 1 deletions

View File

@ -98,6 +98,7 @@ func (us *UserBackyardService) GetUserPage(ctx context.Context, req *schema.GetU
resp := make([]*schema.GetUserPageResp, 0)
for _, u := range users {
avatar := schema.FormatAvatarInfo(u.Avatar)
t := &schema.GetUserPageResp{
UserID: u.ID,
CreatedAt: u.CreatedAt.Unix(),
@ -105,7 +106,7 @@ func (us *UserBackyardService) GetUserPage(ctx context.Context, req *schema.GetU
EMail: u.EMail,
Rank: u.Rank,
DisplayName: u.DisplayName,
Avatar: u.Avatar,
Avatar: avatar,
}
if u.Status == entity.UserStatusDeleted {
t.Status = schema.UserDeleted