Skip to content

Commit

Permalink
Refactor controller mappings and annotations for clarity (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcolon021 authored Jan 17, 2025
1 parent 00fa4ab commit 342a985
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public ResponseEntity<?> getConnectionById(
}

@Operation(description = "GET a list of existing Connection, requires SUPER_ADMIN or ADMIN role")
@GetMapping(value = "/", produces = "application/json")
@GetMapping
@Secured({SUPER_ADMIN, ADMIN})
public ResponseEntity<List<Connection>> getAllConnections() {
List<Connection> allConnections = connectionWebService.getAllConnections();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
@Tag(name = "Role Management")
@Controller
@RequestMapping(value = "/role")
@RequestMapping("/role")
public class RoleController {

private final RoleService roleService;
Expand All @@ -49,8 +49,8 @@ public ResponseEntity<?> getRoleById(
}

@Operation(description = "GET a list of existing Roles, requires ADMIN or SUPER_ADMIN role")
@GetMapping(produces = "application/json")
@RolesAllowed({ADMIN, SUPER_ADMIN})
@GetMapping
public ResponseEntity<List<Role>> getRoleAll() {
List<Role> allRoles = this.roleService.getAllRoles();
return PICSUREResponse.success(allRoles);
Expand Down

0 comments on commit 342a985

Please sign in to comment.