Fixed role typo in athelete creation

This commit is contained in:
Alexis Leboeuf
2026-01-08 16:53:39 +01:00
parent f20d20dd40
commit e3043b021d

View File

@@ -48,7 +48,7 @@ public class AthleteResource {
@ApiResponse(responseCode = "200", description = "Renvoie l'athlète créé", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AthleteDTO.class)))
})
@PostMapping("/create")
@PreAuthorize("hasRole('admin') or hasRole('coach') or hasRole('Athlete')")
@PreAuthorize("hasRole('admin') or hasRole('coach') or hasRole('athlete')")
public ResponseEntity<AthleteDTO> create(@RequestBody AthleteDTO dto) {
Athlete athlete = mapToEntity(dto);
athleteDAO.save(athlete);