added ability to add site through admin UI, fixed Logo control to not render of site does not have a logo, updated launchsettings so that port number is consistent for both IIS Express and .NET Core web server

This commit is contained in:
Shaun Walker
2019-06-14 17:24:52 -04:00
parent d04f3083a8
commit 600872d0b0
10 changed files with 105 additions and 18 deletions

View File

@ -3,6 +3,8 @@ using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Oqtane.Shared;
using System.Collections.Generic;
using System.Linq;
namespace Oqtane.Services
{
@ -22,6 +24,12 @@ namespace Oqtane.Services
get { return CreateApiUrl(sitestate.Alias, "Tenant"); }
}
public async Task<List<Tenant>> GetTenantsAsync()
{
List<Tenant> tenants = await http.GetJsonAsync<List<Tenant>>(apiurl);
return tenants.OrderBy(item => item.Name).ToList();
}
public async Task<Tenant> GetTenantAsync()
{
return await http.GetJsonAsync<Tenant>(apiurl);