diff --git a/server/src/main/java/com/epam/aidial/core/server/controller/ResourceController.java b/server/src/main/java/com/epam/aidial/core/server/controller/ResourceController.java index 0b9b08a2..333e214b 100644 --- a/server/src/main/java/com/epam/aidial/core/server/controller/ResourceController.java +++ b/server/src/main/java/com/epam/aidial/core/server/controller/ResourceController.java @@ -179,7 +179,6 @@ private void validateCustomApplication(Application application) { Config config = context.getConfig(); List files = CustomApplicationUtils.getFiles(config, application, encryptionService, resourceService); - log.error(application.getCustomProperties().toString()); files.stream().filter(resource -> !(resourceService.hasResource(resource) && accessService.hasReadAccess(resource, context))) .findAny().ifPresent(file -> { @@ -225,14 +224,16 @@ private Future putResource(ResourceDescriptor descriptor) { Future responseFuture; if (descriptor.getType() == ResourceTypes.APPLICATION) { - responseFuture = requestFuture.compose(pair -> { + responseFuture = requestFuture.compose(pair -> { EtagHeader etag = pair.getKey(); Application application = ProxyUtil.convertToObject(pair.getValue(), Application.class); - validateCustomApplication(application); - return vertx.executeBlocking(() -> applicationService.putApplication(descriptor, etag, application).getKey(), false); + return vertx.executeBlocking(() -> { + validateCustomApplication(application); + return applicationService.putApplication(descriptor, etag, application).getKey(); + }, false); }); } else { - responseFuture = requestFuture.compose(pair -> { + responseFuture = requestFuture.compose(pair -> { EtagHeader etag = pair.getKey(); String body = pair.getValue(); validateRequestBody(descriptor, body); @@ -269,7 +270,7 @@ private Future deleteResource(ResourceDescriptor descriptor) { if (descriptor.getType() == ResourceTypes.APPLICATION) { applicationService.deleteApplication(descriptor, etag); } else { - deleted = resourceService.deleteResource(descriptor, etag); + deleted = resourceService.deleteResource(descriptor, etag); } if (!deleted) {