unit testing
This commit is contained in:
@ -27,10 +27,10 @@ namespace isnd.Controllers
|
||||
Source = packageManager.CatalogBaseUrl+ApiConfig.Index,
|
||||
Query = model
|
||||
};
|
||||
List<PackageRegistration> registrations = new List<PackageRegistration>();
|
||||
List<Catalog> registrations = new List<Catalog>();
|
||||
foreach (var pk in pkgs.data.GroupBy(x => x.PackageId))
|
||||
{
|
||||
registrations.Add(new PackageRegistration(apiBase, pk.Key, pkgs.GetResults().Single(p=>p.Id == pk.Key).Versions));
|
||||
registrations.Add(new Catalog(apiBase, pk.Key, pkgs.GetResults().Single(p=>p.Id == pk.Key).Versions));
|
||||
}
|
||||
|
||||
return View(new RegistrationPageIndexQueryAndResult
|
||||
@ -81,7 +81,7 @@ namespace isnd.Controllers
|
||||
&& (pkgtype!=null && m.Type == pkgtype || m.Type != "Delete" ));
|
||||
if (packageVersion == null) return NotFound();
|
||||
if (!User.IsOwner(packageVersion)) return Unauthorized();
|
||||
var pkg = await packageManager.GetPackageAsync(pkgid, version, pkgtype);
|
||||
var pkg = await packageManager.GetPackageDetailsAsync(pkgid, version, pkgtype);
|
||||
return View(pkg);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user