Skip to content

Commit

Permalink
Remove all CrossOrigin annotations from ReusabilityController (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosnikolaidis authored Nov 21, 2022
1 parent 8a9bc09 commit 26dfcce
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,21 @@ public class ReusabilityController {
@Autowired
private ReusabilityService reusabilityService;

@CrossOrigin(origins = "*")
@GetMapping(value = "/reusabilityIndexByCommit")
Collection<FileReusabilityIndex> getReusabilityIndexByCommit(@RequestParam(required = true) String url, @RequestParam(required = true) String sha, @RequestParam(required = false) Integer limit) {
return Objects.nonNull(limit) ? reusabilityService.findReusabilityIndexByCommit(url, sha, limit) : reusabilityService.findReusabilityIndexByCommit(url, sha, null);
}

@CrossOrigin(origins = "*")
@GetMapping(value = "/reusabilityIndexByCommitAndFile")
Collection<FileReusabilityIndex> getReusabilityIndexByCommitAndFile(@RequestParam(required = true) String url, @RequestParam(required = true) String sha, @RequestParam(required = true) String filePath) {
return reusabilityService.findReusabilityIndexByCommitAndFile(url, sha, filePath);
}

@CrossOrigin(origins = "*")
@GetMapping(value = "/projectReusabilityIndexByCommit")
Collection<ProjectReusabilityIndex> getProjectReusabilityIndexByCommit(@RequestParam(required = true) String url, @RequestParam(required = true) String sha) {
return reusabilityService.findProjectReusabilityIndexByCommit(url, sha);
}

@CrossOrigin(origins = "*")
@GetMapping(value = "/projectReusabilityIndexPerCommit")
Collection<ProjectReusabilityIndex> getProjectReusabilityIndexPerCommit(@RequestParam(required = true) String url, @RequestParam(required = false) Integer limit) {
return reusabilityService.findProjectReusabilityIndexPerCommit(url, limit);
Expand Down

0 comments on commit 26dfcce

Please sign in to comment.