From d322ff1c50a7b3b0339f00125a74614860528c0d Mon Sep 17 00:00:00 2001 From: rabeaM Date: Thu, 14 Nov 2024 09:49:10 +0100 Subject: [PATCH] Change the endpoint Path --- .../numportal/web/controller/ManagerController.java | 8 ++++---- .../tests/ManagerControllerFeatureDisabledIT.java | 2 +- .../integrationtesting/tests/ManagerControllerIT.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/highmed/numportal/web/controller/ManagerController.java b/src/main/java/org/highmed/numportal/web/controller/ManagerController.java index 6207aaf5..e8268956 100644 --- a/src/main/java/org/highmed/numportal/web/controller/ManagerController.java +++ b/src/main/java/org/highmed/numportal/web/controller/ManagerController.java @@ -32,7 +32,7 @@ @RestController @AllArgsConstructor -@RequestMapping(value = "/query", produces = "application/json") +@RequestMapping(value = "/manager", produces = "application/json") @SecurityRequirement(name = "security_auth") @ConditionalOnProperty(value = "feature.search-with-aql", havingValue = "true") public class ManagerController { @@ -42,7 +42,7 @@ public class ManagerController { private final ExportHeaderUtil exportHeaderUtil; @ContextLog(type = "Manager", description = "Execute AQL queries") - @PostMapping("execute") + @PostMapping("execute/query") @Operation(description = "Executes an AQL query") @PreAuthorize(Role.MANAGER) public ResponseEntity executeManagerQuery( @@ -52,7 +52,7 @@ public ResponseEntity executeManagerQuery( ); } - @PostMapping("/manager/execute") + @PostMapping("/execute/project") @Operation( description = "Executes the manager project aql in the cohort returning medical data matching the templates") @PreAuthorize(Role.MANAGER) @@ -66,7 +66,7 @@ public ResponseEntity executeManagerProject( principal.getSubject())); } - @PostMapping(value = "/manager/export") + @PostMapping(value = "/export") @Operation(description = "Executes the cohort default configuration returns the result as a csv file attachment") @PreAuthorize(Role.MANAGER) public ResponseEntity exportManagerResults( diff --git a/src/test/java/org/highmed/numportal/integrationtesting/tests/ManagerControllerFeatureDisabledIT.java b/src/test/java/org/highmed/numportal/integrationtesting/tests/ManagerControllerFeatureDisabledIT.java index c4fc79ea..a7b11eaa 100644 --- a/src/test/java/org/highmed/numportal/integrationtesting/tests/ManagerControllerFeatureDisabledIT.java +++ b/src/test/java/org/highmed/numportal/integrationtesting/tests/ManagerControllerFeatureDisabledIT.java @@ -22,7 +22,7 @@ public class ManagerControllerFeatureDisabledIT extends IntegrationTest { @Autowired public MockMvc mockMvc; - private static final String PATH = "/query/execute"; + private static final String PATH = "/manager/execute/query"; @Autowired private ObjectMapper mapper; diff --git a/src/test/java/org/highmed/numportal/integrationtesting/tests/ManagerControllerIT.java b/src/test/java/org/highmed/numportal/integrationtesting/tests/ManagerControllerIT.java index 103b63bc..8f963495 100644 --- a/src/test/java/org/highmed/numportal/integrationtesting/tests/ManagerControllerIT.java +++ b/src/test/java/org/highmed/numportal/integrationtesting/tests/ManagerControllerIT.java @@ -31,7 +31,7 @@ public class ManagerControllerIT extends IntegrationTest { @Autowired public MockMvc mockMvc; - private static final String PATH = "/query/execute"; + private static final String PATH = "/manager/execute/query"; @Autowired private ObjectMapper mapper;