diff --git a/src/main/java/org/tkit/onecx/workspace/rs/exim/v1/controllers/ExportImportRestControllerV1.java b/src/main/java/org/tkit/onecx/workspace/rs/exim/v1/controllers/ExportImportRestControllerV1.java index 6a46991..cd3939e 100644 --- a/src/main/java/org/tkit/onecx/workspace/rs/exim/v1/controllers/ExportImportRestControllerV1.java +++ b/src/main/java/org/tkit/onecx/workspace/rs/exim/v1/controllers/ExportImportRestControllerV1.java @@ -86,8 +86,7 @@ public Response exportWorkspacesByNames(ExportWorkspacesRequestDTOV1 request) { if (data.isEmpty()) { return Response.status(Response.Status.NOT_FOUND).build(); } - - var images = imageDAO.findByRefIds(request.getNames()); + var images = imageDAO.findByRefIds(data.keySet()); return Response.ok(mapper.create(data, images)).build(); } diff --git a/src/test/java/org/tkit/onecx/workspace/rs/exim/v1/controllers/WorkspaceEximV1RestControllerTest.java b/src/test/java/org/tkit/onecx/workspace/rs/exim/v1/controllers/WorkspaceEximV1RestControllerTest.java index 05911ae..42d8296 100644 --- a/src/test/java/org/tkit/onecx/workspace/rs/exim/v1/controllers/WorkspaceEximV1RestControllerTest.java +++ b/src/test/java/org/tkit/onecx/workspace/rs/exim/v1/controllers/WorkspaceEximV1RestControllerTest.java @@ -49,6 +49,8 @@ void exportWorkspaceTest() { new EximMicrofrontendDTOV1().appId("theme").basePath("/theme")))); assertThat(w.getSlots()).isNotNull().isNotEmpty().hasSize(3); + + assertThat(w.getImages()).isNotNull().isNotEmpty().hasSize(2); } @Test diff --git a/src/test/resources/data/testdata-exim.xml b/src/test/resources/data/testdata-exim.xml index 2217a32..78ff6d7 100644 --- a/src/test/resources/data/testdata-exim.xml +++ b/src/test/resources/data/testdata-exim.xml @@ -9,8 +9,8 @@ - - + +