Skip to content

Commit

Permalink
add get endpoint for retrieving statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
lenzls committed Apr 20, 2020
1 parent 72e5907 commit 5952af8
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ public Object submitStatisticsViaGET(@RequestParam Map<String, Object> queryPara
return gson.toJson(statistics);
}

@GetMapping(value = "/statistics", produces = "application/json")
@CrossOrigin(origins = "*") // Shouldn't be needed, but adding it just in case…
public Object retrievingStatistics() {
return gson.toJson(readStatisticsFile());
}

@PostMapping(value = "/submit-statistics", produces = "application/json")
@CrossOrigin(origins = "*")
public Object submitStatisticsViaPOST(@RequestBody Map<String, Object> data) {
Expand Down

0 comments on commit 5952af8

Please sign in to comment.