( ctx context.Context, req *userv1.GetUserRequest, )
| 8 | ) |
| 9 | |
| 10 | func (s *UserServer) GetUser( |
| 11 | ctx context.Context, |
| 12 | req *userv1.GetUserRequest, |
| 13 | ) (*userv1.GetUserResponse, error) { |
| 14 | actor, err := contextutil.GetActor(ctx) |
| 15 | if err != nil { |
| 16 | return nil, err |
| 17 | } |
| 18 | |
| 19 | user, err := s.userService.GetUserByID(ctx, actor.ID) |
| 20 | if err != nil { |
| 21 | return nil, err |
| 22 | } |
| 23 | |
| 24 | return &userv1.GetUserResponse{ |
| 25 | User: &userv1.User{ |
| 26 | Id: user.ID.Hex(), |
| 27 | Email: user.Email, |
| 28 | Name: user.Name, |
| 29 | Picture: user.Picture, |
| 30 | }, |
| 31 | }, nil |
| 32 | } |
nothing calls this directly
no test coverage detected