Skip to content

Commit

Permalink
Fix dictionary service path
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed Nov 19, 2024
1 parent da8df75 commit dc0ebe3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ public DictionaryService(@Value("${dictionary.host}") String dictionaryHostTempl
}

public List<Concept> getConcepts(List<String> conceptPaths) {
return restTemplate.exchange(dictionaryHost + "/picsure/proxy/dictionary-api/concepts/detail/", HttpMethod.POST, new HttpEntity<>(conceptPaths), CONCEPT_LIST_TYPE_REFERENCE).getBody();
return restTemplate.exchange(dictionaryHost + "/pic-sure-api-2/PICSURE/proxy/dictionary-api/concepts/detail", HttpMethod.POST, new HttpEntity<>(conceptPaths), CONCEPT_LIST_TYPE_REFERENCE).getBody();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private void writeDrsUris() {
conceptMap = dictionaryService.getConcepts(originalFields).stream()
.collect(Collectors.toMap(Concept::conceptPath, Function.identity()));
} catch (RuntimeException e) {
log.error("Error fetching DRS URIs from dictionary service");
log.error("Error fetching DRS URIs from dictionary service", e);
}

for (int i = 0; i < formattedFields.size(); i++) {
Expand All @@ -144,7 +144,8 @@ private void writeDrsUris() {
if (concept != null) {
Map<String, String> meta = concept.meta();
if (meta != null) {
drsUris = meta.values().stream().toList();
drsUris = new ArrayList<>(meta.keySet().stream().toList());
drsUris.addAll(meta.values().stream().toList());
}
}
drsUriData.put("drs_uri", drsUris);
Expand Down

0 comments on commit dc0ebe3

Please sign in to comment.