GetUserStaff get user staff
(ctx context.Context, req *schema.GetUserStaffReq)
| 824 | |
| 825 | // GetUserStaff get user staff |
| 826 | func (us *UserService) GetUserStaff(ctx context.Context, req *schema.GetUserStaffReq) ( |
| 827 | resp []*schema.GetUserStaffResp, err error) { |
| 828 | userList, err := us.userRepo.SearchUserListByName(ctx, req.Username, req.PageSize, true) |
| 829 | if err != nil { |
| 830 | return nil, err |
| 831 | } |
| 832 | avatarMapping := us.siteInfoService.FormatListAvatar(ctx, userList) |
| 833 | for _, u := range userList { |
| 834 | resp = append(resp, &schema.GetUserStaffResp{ |
| 835 | Username: u.Username, |
| 836 | DisplayName: u.DisplayName, |
| 837 | Avatar: avatarMapping[u.ID].GetURL(), |
| 838 | }) |
| 839 | } |
| 840 | return resp, nil |
| 841 | } |
| 842 | |
| 843 | // UserUnsubscribeNotification user unsubscribe email notification |
| 844 | func (us *UserService) UserUnsubscribeNotification( |
no test coverage detected