( ctx context.Context, req *pb.PokemonID, )
| 86 | } |
| 87 | |
| 88 | func (s *Server) ReadOne( |
| 89 | ctx context.Context, |
| 90 | req *pb.PokemonID, |
| 91 | ) (*pb.Pokemon, error) { |
| 92 | pokemon, err := s.repository.FindByID(ctx, req.Id) |
| 93 | if err != nil { |
| 94 | return nil, status.Errorf(codes.NotFound, "failed to find pokemon") |
| 95 | } |
| 96 | |
| 97 | res := pokemonToResponse(pokemon) |
| 98 | |
| 99 | return &res, nil |
| 100 | } |
| 101 | |
| 102 | func (s *Server) Update( |
| 103 | ctx context.Context, |
nothing calls this directly
no test coverage detected