diff --git a/src/main/java/org/tkit/onecx/shell/bff/rs/mappers/WorkspaceConfigMapper.java b/src/main/java/org/tkit/onecx/shell/bff/rs/mappers/WorkspaceConfigMapper.java index 597cc88..bacc5b9 100644 --- a/src/main/java/org/tkit/onecx/shell/bff/rs/mappers/WorkspaceConfigMapper.java +++ b/src/main/java/org/tkit/onecx/shell/bff/rs/mappers/WorkspaceConfigMapper.java @@ -125,10 +125,10 @@ default void createThemeAfter(@MappingTarget ThemeDTO target, Theme themeInfo, S target.setProperties(String.valueOf(themeInfo.getProperties())); } if (target.getFaviconUrl() == null) { - target.setFaviconUrl(path + "/themes/" + target.getName() + "/favicon"); + target.setFaviconUrl(path.replace("/load", "") + "/themes/" + target.getName() + "/favicon"); } if (target.getLogoUrl() == null) { - target.setLogoUrl(path + "/themes/" + target.getName() + "/logo"); + target.setLogoUrl(path.replace("/load", "") + "/themes/" + target.getName() + "/logo"); } } diff --git a/src/test/java/org/tkit/onecx/shell/bff/rs/WorkspaceConfigRestControllerTest.java b/src/test/java/org/tkit/onecx/shell/bff/rs/WorkspaceConfigRestControllerTest.java index e32734c..54ca36a 100644 --- a/src/test/java/org/tkit/onecx/shell/bff/rs/WorkspaceConfigRestControllerTest.java +++ b/src/test/java/org/tkit/onecx/shell/bff/rs/WorkspaceConfigRestControllerTest.java @@ -281,8 +281,7 @@ void loadWorkspaceConfigByBaseUrlTest() { .withBody(JsonBody.json(productResponse))); Theme themeResponse = new Theme(); - themeResponse.name("theme1").cssFile("cssfile").properties(new Object()).logoUrl("someLogoUrl") - .faviconUrl("someFavIconUrl"); + themeResponse.name("theme1").cssFile("cssfile").properties(new Object()).faviconUrl("someUrl"); // create mock rest endpoint for get theme by name from theme-svc mockServerClient.when(request().withPath("/v1/themes/theme1").withMethod(HttpMethod.GET)) .withId("mockTheme") @@ -313,7 +312,7 @@ void loadWorkspaceConfigByBaseUrlTest() { Assertions.assertEquals(productResponse.getProducts().get(0).getMicrofrontends().get(0).getEndpoints().size(), output.getRoutes().get(0).getEndpoints().size()); Assertions.assertEquals("endpoint1", output.getRoutes().get(0).getEndpoints().get(0).getName()); - + Assertions.assertEquals("/workspaceConfig/themes/theme1/logo", output.getTheme().getLogoUrl()); mockServerClient.clear("mockWS"); mockServerClient.clear("mockPS"); mockServerClient.clear("mockTheme");