Skip to content

Commit

Permalink
Merge branch 'feature/364'
Browse files Browse the repository at this point in the history
  • Loading branch information
josdem committed Oct 1, 2024
2 parents 1efe7e7 + 42f3087 commit bbc3bb2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
@RequiredArgsConstructor
public class BreedController {

public static final String DOMAIN = "vetlog.org";
private final BreedService breedService;

@GetMapping(value = "/list")
public List<Breed> listByType(@RequestParam String type, HttpServletResponse response) {
log.info("Listing Pets by type: {}", type);

response.addHeader("Allow-Control-Allow-Methods", "GET");
response.addHeader("Access-Control-Allow-Origin", "*");
response.addHeader("Access-Control-Allow-Origin", DOMAIN);
return breedService.getBreedsByType(PetType.getPetTypeByValue(type));
}
}

0 comments on commit bbc3bb2

Please sign in to comment.