Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/PetServiceImplementation.java

    r4103eaa ra762b3a  
    77
    88import java.util.List;
     9import java.util.Optional;
    910
    1011@Service
     
    2324
    2425    @Override
    25     public List<Pet> listpets() {return this.petRepository.findAll();}
     26    public List<Pet> findAll() {
     27        return this.petRepository.findAll();
     28    }
    2629
    2730    @Override
    28     public Pet findById(Integer id) {
    29         return this.petRepository.findById(id).get();
     31    public Optional<Pet> findById(Integer petId) {
     32        return this.petRepository.findById(petId);
    3033    }
    3134}
Note: See TracChangeset for help on using the changeset viewer.