Browse Source

Fix type issue after the updating core module proxies

pull/12660/head
Mahmut Gundogdu 4 years ago
parent
commit
3f9fa6d287
  1. 4
      npm/ng-packs/packages/account-core/src/lib/tenant-box.service.ts
  2. 6
      npm/ng-packs/packages/core/src/lib/services/multi-tenancy.service.ts

4
npm/ng-packs/packages/account-core/src/lib/tenant-box.service.ts

@ -23,7 +23,7 @@ export class TenantBoxService {
private tenantService: AbpTenantService,
private sessionState: SessionStateService,
private configState: ConfigStateService,
) {}
) { }
onSwitch() {
const tenant = this.sessionState.getTenant();
@ -40,7 +40,7 @@ export class TenantBoxService {
this.modalBusy = true;
this.tenantService
.findTenantByName(this.name, {})
.findTenantByName(this.name)
.pipe(finalize(() => (this.modalBusy = false)))
.subscribe(({ success, tenantId: id, ...tenant }) => {
if (!success) {

6
npm/ng-packs/packages/core/src/lib/services/multi-tenancy.service.ts

@ -29,17 +29,17 @@ export class MultiTenancyService {
private tenantService: AbpTenantService,
private configStateService: ConfigStateService,
@Inject(TENANT_KEY) public tenantKey: string,
) {}
) { }
setTenantByName(tenantName: string) {
return this.tenantService
.findTenantByName(tenantName, { [this.tenantKey]: '' })
.findTenantByName(tenantName)
.pipe(switchMap(this.setTenantToState));
}
setTenantById(tenantId: string) {
return this.tenantService
.findTenantById(tenantId, { [this.tenantKey]: '' })
.findTenantById(tenantId)
.pipe(switchMap(this.setTenantToState));
}
}

Loading…
Cancel
Save