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);