Skip to content

Commit

Permalink
Inject buildInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
calixtus committed Oct 14, 2024
1 parent 0995813 commit 364b847
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2092,7 +2092,11 @@ private List<String> getFetcherKeysFromKeyring(List<String> names) {
}

private Map<String, String> getDefaultFetcherKeys() {
BuildInfo buildInfo = new BuildInfo();
BuildInfo buildInfo = Injector.instantiateModelOrService(BuildInfo.class);
if (buildInfo == null) {
return Collections.emptyMap();
}

Map<String, String> keys = new HashMap<>();
keys.put(SemanticScholarFetcher.FETCHER_NAME, buildInfo.semanticScholarApiKey);
keys.put(AstrophysicsDataSystem.FETCHER_NAME, buildInfo.astrophysicsDataSystemAPIKey);
Expand Down

0 comments on commit 364b847

Please sign in to comment.