@RequestMapping( value = "/distro/{distroName}", method = RequestMethod.GET, produces = "application/json") @ResponseBody public DistroRead getDistroByName(@PathVariable("distroName") String distroName) { DistroRead distro = distroManager.getDistroByName(distroName); if (distro == null) { throw BddException.NOT_FOUND("distro", distroName); } return distro; }
@RequestMapping(value = "/distros", method = RequestMethod.GET, produces = "application/json") @ResponseBody public List<DistroRead> getDistros() { return distroManager.getDistros(); }