Searching deleted package

This commit is contained in:
2023-04-26 01:22:33 +01:00
parent e5932a11c2
commit e2775dedaf
8 changed files with 36 additions and 40 deletions

View File

@ -18,8 +18,13 @@ namespace isnd.Controllers
// Web search
public async Task<IActionResult> Index(PackageRegistrationQuery model)
{
return View(new RegistrationPageIndexQueryAndResult{Query = model,
Result = await packageManager.SearchPackageAsync(model)});
var pkgs = await packageManager.SearchPackageAsync(model);
return View(new RegistrationPageIndexQueryAndResult
{
Query = model,
Result = pkgs.ToArray()
});
}
public async Task<IActionResult> Details(PackageDetailViewModel model)
@ -30,6 +35,7 @@ namespace isnd.Controllers
}
var packageVersion = dbContext.PackageVersions
.Include(p=>p.LatestCommit)
.Include(p => p.Package)
.Where(m => m.PackageId == model.pkgid)
.OrderByDescending(p => p)
@ -48,7 +54,7 @@ namespace isnd.Controllers
}
const int MAX_PKG_VERSION_LIST = 50;
[Authorize]
[Authorize, HttpGet]
public async Task<IActionResult> Delete(string pkgid, string version, string pkgtype)
{
if (pkgid == null || version == null)
@ -66,7 +72,7 @@ namespace isnd.Controllers
}
// POST: PackageVersion/Delete/5
[HttpPost, ActionName("Delete")]
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(string PackageId, string FullString,
string Type)