Skip to content

Commit 342a985

Browse files
authored
Refactor controller mappings and annotations for clarity (#236)
1 parent 00fa4ab commit 342a985

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pic-sure-auth-services/src/main/java/edu/harvard/hms/dbmi/avillach/auth/rest/ConnectionWebController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public ResponseEntity<?> getConnectionById(
4949
}
5050

5151
@Operation(description = "GET a list of existing Connection, requires SUPER_ADMIN or ADMIN role")
52-
@GetMapping(value = "/", produces = "application/json")
52+
@GetMapping
5353
@Secured({SUPER_ADMIN, ADMIN})
5454
public ResponseEntity<List<Connection>> getAllConnections() {
5555
List<Connection> allConnections = connectionWebService.getAllConnections();

pic-sure-auth-services/src/main/java/edu/harvard/hms/dbmi/avillach/auth/rest/RoleController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626
@Tag(name = "Role Management")
2727
@Controller
28-
@RequestMapping(value = "/role")
28+
@RequestMapping("/role")
2929
public class RoleController {
3030

3131
private final RoleService roleService;
@@ -49,8 +49,8 @@ public ResponseEntity<?> getRoleById(
4949
}
5050

5151
@Operation(description = "GET a list of existing Roles, requires ADMIN or SUPER_ADMIN role")
52-
@GetMapping(produces = "application/json")
5352
@RolesAllowed({ADMIN, SUPER_ADMIN})
53+
@GetMapping
5454
public ResponseEntity<List<Role>> getRoleAll() {
5555
List<Role> allRoles = this.roleService.getAllRoles();
5656
return PICSUREResponse.success(allRoles);

0 commit comments

Comments
 (0)