From 9b22ade1ce4fab5cd44bb6bd8effeadd7357aaff Mon Sep 17 00:00:00 2001
From: Patrizio Bekerle <patrizio@bekerle.com>
Date: Mon, 25 Jan 2021 15:21:21 +0100
Subject: [PATCH] Remove "commonUtils.getAPiUrl()" calls

---
 packages/app-shell/src/app-shell.js | 5 ++---
 packages/auth/src/auth-keycloak.js  | 3 +--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/packages/app-shell/src/app-shell.js b/packages/app-shell/src/app-shell.js
index 4969de66..ece65ffe 100644
--- a/packages/app-shell/src/app-shell.js
+++ b/packages/app-shell/src/app-shell.js
@@ -7,7 +7,6 @@ import {AuthKeycloak} from '@dbp-toolkit/auth';
 import {AuthMenuButton} from './auth-menu-button.js';
 import {Notification} from '@dbp-toolkit/notification';
 import * as commonStyles from '@dbp-toolkit/common/styles';
-import * as commonUtils from '@dbp-toolkit/common/utils';
 import {classMap} from 'lit-html/directives/class-map.js';
 import {Router} from './router.js';
 import {BuildInfo} from './build-info.js';
@@ -47,7 +46,7 @@ export class AppShell extends ScopedElementsMixin(AdapterLitElement) {
         super();
         this.lang = i18n.language;
         this.activeView = '';
-        this.entryPointUrl = commonUtils.getAPiUrl();
+        this.entryPointUrl = '';
         this.subtitle = '';
         this.description = '';
         this.routes = [];
@@ -815,7 +814,7 @@ export class AppShell extends ScopedElementsMixin(AdapterLitElement) {
 
         return html`
             <slot class="${slotClassMap}"></slot>
-            <dbp-auth-keycloak lang="${this.lang}" url="${kc.url}" realm="${kc.realm}" client-id="${kc.clientId}" silent-check-sso-redirect-uri="${kc.silentCheckSsoRedirectUri || ''}" scope="${kc.scope || ''}"  idp-hint="${kc.idpHint || ''}" load-person ?force-login="${kc.forceLogin}" ?try-login="${!kc.forceLogin}"></dbp-auth-keycloak>
+            <dbp-auth-keycloak lang="${this.lang}" entry-point-url="${this.entryPointUrl}" url="${kc.url}" realm="${kc.realm}" client-id="${kc.clientId}" silent-check-sso-redirect-uri="${kc.silentCheckSsoRedirectUri || ''}" scope="${kc.scope || ''}"  idp-hint="${kc.idpHint || ''}" load-person ?force-login="${kc.forceLogin}" ?try-login="${!kc.forceLogin}"></dbp-auth-keycloak>
             <dbp-matomo endpoint="${this.matomoUrl}" site-id="${this.matomoSiteId}" git-info="${this.gitInfo}"></dbp-matomo>
             <div class="${mainClassMap}">
             <div id="main">
diff --git a/packages/auth/src/auth-keycloak.js b/packages/auth/src/auth-keycloak.js
index 840c611e..38c38942 100644
--- a/packages/auth/src/auth-keycloak.js
+++ b/packages/auth/src/auth-keycloak.js
@@ -1,6 +1,5 @@
 import {i18n} from './i18n.js';
 import JSONLD from '@dbp-toolkit/common/jsonld';
-import * as commonUtils from '@dbp-toolkit/common/utils';
 import {EventBus} from '@dbp-toolkit/common';
 import  {KeycloakWrapper} from './keycloak.js';
 import {LoginStatus} from './util.js';
@@ -33,7 +32,7 @@ export class AuthKeycloak extends AdapterLitElement {
         this.personId = "";
         this.tryLogin = false;
         this.person = null;
-        this.entryPointUrl = commonUtils.getAPiUrl();
+        this.entryPointUrl = '';
         this._loginStatus = LoginStatus.UNKNOWN;
 
         // Keycloak config
-- 
GitLab