change internal method in getAllVets()

This commit is contained in:
Vitaliy Fedoriv 2016-11-08 00:06:59 +02:00
parent e674810d71
commit 4fd0051328

View file

@ -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);
}