remove admin previlige in creation
This commit is contained in:
@@ -32,7 +32,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/athlete")
|
||||
public class AthleteResource {
|
||||
@@ -45,7 +44,6 @@ 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')") // Only admin can create??
|
||||
public ResponseEntity<AthleteDTO> create(@RequestBody AthleteDTO dto) {
|
||||
Athlete athlete = mapToEntity(dto);
|
||||
athleteDAO.save(athlete);
|
||||
|
||||
Reference in New Issue
Block a user