(ctx context.Context, id string)
| 86 | } |
| 87 | |
| 88 | func (us *UserCommon) GetUserBasicInfoByID(ctx context.Context, id string) ( |
| 89 | userBasicInfo *schema.UserBasicInfo, exist bool, err error) { |
| 90 | userInfo, exist, err := us.userRepo.GetByUserID(ctx, id) |
| 91 | if err != nil { |
| 92 | return nil, exist, err |
| 93 | } |
| 94 | info := us.FormatUserBasicInfo(ctx, userInfo) |
| 95 | info.Avatar = us.siteInfoCommonService.FormatAvatar(ctx, userInfo.Avatar, userInfo.EMail, userInfo.Status).GetURL() |
| 96 | return info, exist, nil |
| 97 | } |
| 98 | |
| 99 | func (us *UserCommon) GetUserBasicInfoByUserName(ctx context.Context, username string) (*schema.UserBasicInfo, bool, error) { |
| 100 | userInfo, exist, err := us.userRepo.GetByUsername(ctx, username) |
no test coverage detected