|
|
|
@ -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)); |
|
|
|
} |
|
|
|
} |
|
|
|
|