This commit is contained in:
Anthony Stirling 2023-12-27 15:18:26 +00:00
parent 84aebe3851
commit e9947da5b4
3 changed files with 6 additions and 4 deletions

View file

@ -33,8 +33,8 @@ public class ApiDocService {
return userService.getApiKeyForUser(Role.INTERNAL_API_USER.getRoleId());
}
@EventListener(ApplicationReadyEvent.class)
private void loadApiDocumentation() {
//@EventListener(ApplicationReadyEvent.class)
private synchronized void loadApiDocumentation() {
try {
HttpHeaders headers = new HttpHeaders();
String apiKey = getApiKeyForUser();
@ -67,6 +67,9 @@ public class ApiDocService {
}
public boolean isValidOperation(String operationName, Map<String, Object> parameters) {
if(apiDocumentation.size() == 0) {
loadApiDocumentation();
}
if (!apiDocumentation.containsKey(operationName)) {
return false;
}

View file

@ -332,7 +332,6 @@ public class PipelineController {
String apiKey = getApiKeyForUser();
headers.add("X-API-Key", apiKey);
headers.setContentType(MediaType.MULTIPART_FORM_DATA);
HttpEntity<MultiValueMap<String, Object>> entity = new HttpEntity<>(body, headers);

View file

@ -77,7 +77,7 @@
<li>For reuse, download the config file and re-upload it when needed, or place it in /pipeline/defaultWebUIConfigs/ to auto-load in the web UI for all users</li>
</ul>
<h3>How to use config for folder scanning</h3>
<h3>How to use pre-load configs in web UI</h3>
<ul>
<li>Download config files</li>
<li>For reuse, download the config file and re-upload it when needed, or place it in /pipeline/defaultWebUIConfigs/ to auto-load in the web UI for all users</li>