mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:15:50 +00:00
change internal method in getAllVets()
This commit is contained in:
parent
e674810d71
commit
4fd0051328
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ public class VetRestController {
|
|||
@RequestMapping(value = "/", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
||||
public ResponseEntity<Collection<Vet>> getAllVets(){
|
||||
Collection<Vet> vets = new ArrayList<Vet>();
|
||||
vets.addAll(this.clinicService.findVets());
|
||||
vets.addAll(this.clinicService.findAllVets());
|
||||
if (vets.isEmpty()){
|
||||
return new ResponseEntity<Collection<Vet>>(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue