isntallation steps

This commit is contained in:
Paul Schneider 2021-07-05 21:24:37 +01:00
commit 709e1433bb
10 changed files with 83 additions and 42 deletions

View file

@ -22,13 +22,27 @@ namespace isn
// GET: PackageVersion
public async Task<IActionResult> Index(PackageVersionIndexViewModel model)
{
var applicationDbContext = _context.PackageVersions.Include(p => p.Package).Where(p => p.PackageId == model.PackageId);
var applicationDbContext = _context.PackageVersions.Include(p => p.Package).Where(p => p.PackageId.StartsWith(model.PackageId));
model.Versions = await applicationDbContext.ToListAsync();
return View(model);
}
[Authorize]
public async Task<IActionResult> Mines(PackageVersionIndexViewModel model)
{
var userId = User.FindFirstValue(ClaimTypes.NameIdentifier);
var applicationDbContext = _context.PackageVersions
.Include(p => p.Package).Where(
p => (string.IsNullOrEmpty(model.PackageId) || p.PackageId.StartsWith(model.PackageId))
&& p.Package.OwnerId == userId);
model.Versions = await applicationDbContext.ToListAsync();
return View("Index", model);
}
// GET: PackageVersion/Details/5
public async Task<IActionResult> Details(string pkgid, string version)
{