Merge remote-tracking branch 'refs/remotes/origin/main'

This commit is contained in:
Alexis Leboeuf
2026-01-07 13:10:56 +01:00
11 changed files with 151 additions and 37 deletions

View File

@@ -14,7 +14,7 @@ import org.springframework.web.server.ResponseStatusException;
import java.util.ArrayList;
import java.util.List;
@Controller
@RestController
@RequestMapping("/coach")
public class CoachResource {
@Autowired
@@ -29,8 +29,8 @@ public class CoachResource {
}
@GetMapping("/all")
@PreAuthorize("hasRole('Admin') or hasRole('Coach')")
public List<CoachDTO> getAll() {
System.out.println("GET /coach/all called");
List<Coach> coaches = coachDAO.findAll();
List<CoachDTO> dtos = new ArrayList<>();
for (Coach coach : coaches) {

View File

@@ -7,5 +7,7 @@ spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
server.port=8081
server.servlet.context-path=/api
spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8080/realms/Frisbyee_realm
spring.security.oauth2.resourceserver.jwt.jwk-set-uri: http://localhost:8080/realms/Frisbyee_realm/protocol/openid-connect/certs