Skip to content

Commit

Permalink
simplify routing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
culmat committed Apr 18, 2024
1 parent 1d72e6b commit fca3ccd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/baloise/azure/FunctionalOrgEndpoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ public HttpResponseMessage v1(
try {
List<String> path = asList(request.getUri().getPath().split("/"));
path = path.subList(path.indexOf("V1")+1, path.size());
if(path.size() ==1 && "~rolesSchemes".equals(path.get(0))) {
if("~rolesSchemes".equals(path.get(0))) {
return createJSONResponse(request, Map.of("default", graph().getDefaultRoleScheme(), "roleSchemes", graph().getRoleSchemes()));
} else if(path.size() ==2 && "~avatar".equals(path.get(0))) {
} else if("~avatar".equals(path.get(0))) {
return createAvatarResponse(request, path.get(1));
}

Expand Down

0 comments on commit fca3ccd

Please sign in to comment.