improve performance of alias handling and allow aliases to be an unlimited number of subfolders in depth

This commit is contained in:
Shaun Walker
2020-05-05 09:15:36 -04:00
parent bf84f12471
commit a02cfea6c9
54 changed files with 320 additions and 586 deletions

View File

@ -2,29 +2,15 @@
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Oqtane.Shared;
using System.Linq;
namespace Oqtane.Services
{
public class PackageService : ServiceBase, IPackageService
{
private readonly SiteState _siteState;
private readonly NavigationManager _navigationManager;
{
public PackageService(HttpClient http) : base(http) { }
public PackageService(HttpClient http, SiteState siteState, NavigationManager navigationManager) : base(http)
{
_siteState = siteState;
_navigationManager = navigationManager;
}
private string Apiurl
{
get { return CreateApiUrl(_siteState.Alias, _navigationManager.Uri, "Package"); }
}
private string Apiurl => CreateApiUrl("Package");
public async Task<List<Package>> GetPackagesAsync(string tag)
{