Small changes, breaking the tests

This commit is contained in:
Victor Rosenberg 2024-12-04 10:58:11 +02:00
parent 42e2c74b0b
commit 86295cda6e

View file

@ -62,12 +62,13 @@ class VetController {
private Page<Vet> findPaginated(int page) {
int pageSize = 5;
Pageable pageable = PageRequest.of(page - 1, pageSize);
Pageable pageable = PageRequest.of(page - 2, pageSize);
return vetRepository.findAll(pageable);
}
@GetMapping({"/vets"})
public @ResponseBody Vets showResourcesVetList() {
@ResponseBody
public Vets showResourcesVetList() {
// Here we are returning an object of type 'Vets' rather than a collection of Vet
// objects so it is simpler for JSon/Object mapping
Vets vets = new Vets();