diff --git a/npm/ng-packs/packages/core/src/lib/services/multi-tenancy.service.ts b/npm/ng-packs/packages/core/src/lib/services/multi-tenancy.service.ts index 39505b45d5..3789eb0847 100644 --- a/npm/ng-packs/packages/core/src/lib/services/multi-tenancy.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/multi-tenancy.service.ts @@ -1,15 +1,18 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { ABP } from '../models/common'; -import { FindTenantResultDto } from '../models/find-tenant-result-dto'; +import { + CurrentTenantDto, + FindTenantResultDto, +} from '../proxy/volo/abp/asp-net-core/mvc/multi-tenancy/models'; import { RestService } from './rest.service'; import { SessionStateService } from './session-state.service'; @Injectable({ providedIn: 'root' }) export class MultiTenancyService { - private _domainTenant: ABP.BasicItem = null; + private _domainTenant: CurrentTenantDto = null; - set domainTenant(value: ABP.BasicItem) { + set domainTenant(value: CurrentTenantDto) { this._domainTenant = value; this.sessionState.setTenant(value); } @@ -24,6 +27,9 @@ export class MultiTenancyService { constructor(private restService: RestService, private sessionState: SessionStateService) {} + /** + * @deprecated Use AbpTenantService.findTenantByName method instead. To be deleted in v5.0. + */ findTenantByName(name: string, headers: ABP.Dictionary): Observable { return this.restService.request( { @@ -35,6 +41,9 @@ export class MultiTenancyService { ); } + /** + * @deprecated Use AbpTenantService.findTenantById method instead. To be deleted in v5.0. + */ findTenantById(id: string, headers: ABP.Dictionary): Observable { return this.restService.request( { url: `/api/abp/multi-tenancy/tenants/by-id/${id}`, method: 'GET', headers },