What the fuck spring boot

This commit is contained in:
Laurent
2024-10-24 12:56:44 +02:00
parent da8640fc8f
commit c514a94b5b
3 changed files with 8 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ public class ScoreController {
this.scoreRepo = scoreRepo;
}
@PostMapping("/api/submit")
@PostMapping({"/api/submit", "/api/submit/"})
public ResponseEntity<?> submit(@RequestBody Score s){
ScoreEntity se = new ScoreEntity();
@@ -36,7 +36,7 @@ public class ScoreController {
return ResponseEntity.ok().build();
}
@GetMapping("/api/leaderboard")
@GetMapping({"/api/leaderboard", "/api/leaderboard/"})
public ResponseEntity<?> leaderboard(){
return ResponseEntity.ok(scoreRepo.findLeaderboard());
}