diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/assembly/component/CwaApiStructureProvider.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/assembly/component/CwaApiStructureProvider.java index 5073432e01..540f12d1d7 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/assembly/component/CwaApiStructureProvider.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/assembly/component/CwaApiStructureProvider.java @@ -34,9 +34,6 @@ @Component public class CwaApiStructureProvider { - public static final String VERSION_DIRECTORY = "version"; - public static final String VERSION_V1 = "v1"; - private final AppConfigurationStructureProvider appConfigurationStructureProvider; private final DiagnosisKeysStructureProvider diagnosisKeysStructureProvider; @@ -60,7 +57,8 @@ public class CwaApiStructureProvider { */ public Directory getDirectory() { IndexDirectoryOnDisk versionDirectory = - new IndexDirectoryOnDisk<>(VERSION_DIRECTORY, __ -> Set.of(VERSION_V1), Object::toString); + new IndexDirectoryOnDisk<>(distributionServiceConfig.getApi().getVersionPath(), + __ -> Set.of(distributionServiceConfig.getApi().getVersionV1()), Object::toString); versionDirectory .addWritableToAll(__ -> appConfigurationStructureProvider.getAppConfiguration()); diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/objectstore/S3Publisher.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/objectstore/S3Publisher.java index 642233a4cf..492b9e0261 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/objectstore/S3Publisher.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/objectstore/S3Publisher.java @@ -20,7 +20,7 @@ package app.coronawarn.server.services.distribution.objectstore; -import app.coronawarn.server.services.distribution.assembly.component.CwaApiStructureProvider; +import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; import app.coronawarn.server.services.distribution.objectstore.client.ObjectStoreOperationFailedException; import app.coronawarn.server.services.distribution.objectstore.publish.LocalFile; import app.coronawarn.server.services.distribution.objectstore.publish.PublishFileSet; @@ -37,8 +37,7 @@ import org.springframework.stereotype.Component; /** - * Publishes a folder on the disk to S3 while keeping the folder and file structure.
- * Moreover, does the following: + * Publishes a folder on the disk to S3 while keeping the folder and file structure.
Moreover, does the following: *
*