From f57e0563683c2d9ed33dd4774704f4aaa52120ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Tue, 11 May 2021 14:59:16 +0200 Subject: [PATCH] fix: versionInfo as part of ui-config --- .../routes/admin-api/bootstrap-controller.ts | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/lib/routes/admin-api/bootstrap-controller.ts b/src/lib/routes/admin-api/bootstrap-controller.ts index 065a91302f7..33a01731bad 100644 --- a/src/lib/routes/admin-api/bootstrap-controller.ts +++ b/src/lib/routes/admin-api/bootstrap-controller.ts @@ -106,16 +106,20 @@ class BootstrapController extends Controller { const authenticationType = this.config.authentication && this.config.authentication.type; + const versionInfo = this.versionService.getVersionInfo(); + + const uiConfig = { + ...this.config.ui, + authenticationType, + environment: 'test', + unleashUrl: this.config.server.unleashUrl, + version, + baseUriPath: this.config.server.baseUriPath, + versionInfo, + }; res.json({ - uiConfig: { - ...this.config.ui, - authenticationType, - unleashUrl: this.config.server.unleashUrl, - version, - baseUriPath: this.config.server.baseUriPath, - }, - version: this.versionService.getVersionInfo(), + uiConfig, user: { ...req.user, permissions: userPermissions }, email: this.emailService.isEnabled(), context,