Browse Source

fix: DTR in not replacing placeholder from baseUrl

pull/9768/head
bnymncoskuner 5 years ago
parent
commit
eb172909fd
  1. 7
      npm/ng-packs/packages/core/src/lib/utils/multi-tenancy-utils.ts

7
npm/ng-packs/packages/core/src/lib/utils/multi-tenancy-utils.ts

@ -46,10 +46,15 @@ export async function parseTenantFromUrl(injector: Injector) {
const setEnvironmentWithDomainTenant = (tenant: FindTenantResultDto) => {
hideTenantBox();
setDomainTenant(tenant);
replaceTenantNameWithinEnvironment(injector, tenant.name);
};
if (tenancyName) {
/**
* We have to replace tenant name within the urls from environment,
* because the code below will make a http request to find information about the domain tenant.
* Before this request takes place, we need to replace placeholders aka "{0}".
*/
replaceTenantNameWithinEnvironment(injector, tenancyName);
return multiTenancyService
.setTenantByName(tenancyName)
.pipe(tap(setEnvironmentWithDomainTenant))

Loading…
Cancel
Save