SUPPORT-9001: refactor

This commit is contained in:
adel.ka 2025-03-14 12:37:33 +03:00
parent 891a643fb4
commit f0936bf493
3 changed files with 3 additions and 6 deletions

View file

@ -85,8 +85,7 @@ public class ErvuUserGridLoadService extends Behavior implements GridService {
HttpRequest request = HttpRequest.newBuilder()
.uri(UriComponentsBuilder.fromHttpUrl(ervuUrl)
.pathSegment(PathConstant.ACCOUNTS_PATH)
.pathSegment(FILTER_PATH)
.pathSegment(PathConstant.ACCOUNTS_PATH, FILTER_PATH)
.build().toUri())
.header(HttpHeaders.CONTENT_TYPE, "application/json")
.header(HttpHeaders.AUTHORIZATION, "Bearer " + securityContext.getToken())

View file

@ -36,8 +36,7 @@ public class RoleServiceImpl extends AbstractUserDataService {
private List<Role> fetchRolesByAccountId(Object accountId) throws IOException, InterruptedException {
String url = UriComponentsBuilder.fromHttpUrl(ervuUrl)
.path(PathConstant.ACCOUNTS_PATH)
.pathSegment(accountId.toString())
.pathSegment(ROLES)
.pathSegment(accountId.toString(), ROLES)
.toUriString();
HttpResponse<String> response = sendGetRequest(url);

View file

@ -34,8 +34,7 @@ public class UserCredentialsServiceIpml extends AbstractUserDataService {
private List<Credential> fetchCredentialsByPersonId(Object personId) throws IOException, InterruptedException {
String url = UriComponentsBuilder.fromHttpUrl(ervuUrl)
.path(PathConstant.PERSONS_PATH)
.pathSegment(personId.toString())
.pathSegment(CREDENTIALS)
.pathSegment(personId.toString(), CREDENTIALS)
.toUriString();
HttpResponse<String> response = sendGetRequest(url);