Trying and find a package from API

This commit is contained in:
2023-05-01 22:05:39 +01:00
parent 06b0115405
commit 9e79edc624
19 changed files with 182 additions and 201 deletions

View File

@ -4,7 +4,6 @@ using Microsoft.Extensions.Logging;
using isnd.Data;
using System.Linq;
using isnd.ViewModels;
using Unleash;
using System.Reflection;
using Microsoft.EntityFrameworkCore;
@ -16,19 +15,14 @@ namespace isnd.Controllers
public class HomeController : Controller
{
private readonly ApplicationDbContext _dbContext;
private readonly IUnleash _unleashĈlient;
/// <summary>
/// Home controller ctor
/// </summary>
/// <param name="dbContext"></param>
/// <param name="unleashĈlient"></param>
public HomeController(
ApplicationDbContext dbContext,
IUnleash unleashĈlient)
ApplicationDbContext dbContext)
{
_dbContext = dbContext;
_unleashĈlient = unleashĈlient;
}
public IActionResult Index()
@ -36,9 +30,7 @@ namespace isnd.Controllers
return View(new HomeIndexViewModel{
PkgCount = _dbContext.Packages
.Where(p => p.Versions.Count > 0)
.Count(),
UnleashClient = _unleashĈlient
});
.Count()});
}
public IActionResult About()