Fixed role typo in athelete creation
This commit is contained in:
@@ -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)))
|
@ApiResponse(responseCode = "200", description = "Renvoie l'athlète créé", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AthleteDTO.class)))
|
||||||
})
|
})
|
||||||
@PostMapping("/create")
|
@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) {
|
public ResponseEntity<AthleteDTO> create(@RequestBody AthleteDTO dto) {
|
||||||
Athlete athlete = mapToEntity(dto);
|
Athlete athlete = mapToEntity(dto);
|
||||||
athleteDAO.save(athlete);
|
athleteDAO.save(athlete);
|
||||||
|
|||||||
Reference in New Issue
Block a user