Performance improvements, refactoring of multi-tenant support, split Alias and Tenant entities for cleaner separation of concerns, create an additional site during installation for demonstratng multitenancy
This commit is contained in:
@ -2,18 +2,24 @@
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
public class TenantService : ServiceBase, ITenantService
|
||||
{
|
||||
private readonly HttpClient http;
|
||||
private readonly string apiurl;
|
||||
private readonly SiteState sitestate;
|
||||
|
||||
public TenantService(HttpClient http, IUriHelper urihelper)
|
||||
public TenantService(HttpClient http, SiteState sitestate)
|
||||
{
|
||||
this.http = http;
|
||||
apiurl = CreateApiUrl(urihelper.GetAbsoluteUri(), "Tenant");
|
||||
this.sitestate = sitestate;
|
||||
}
|
||||
|
||||
private string apiurl
|
||||
{
|
||||
get { return CreateApiUrl(sitestate.Alias, "Tenant"); }
|
||||
}
|
||||
|
||||
public async Task<Tenant> GetTenantAsync()
|
||||
|
Reference in New Issue
Block a user