getversions

This commit is contained in:
Paul Schneider 2021-06-22 01:25:28 +01:00
commit eba75d0db4
2 changed files with 73 additions and 9 deletions

View file

@ -55,7 +55,7 @@ namespace nuget_host.Controllers
var archive = new ZipArchive(fw);
var nuspec = archive.Entries.FirstOrDefault(e => e.FullName.EndsWith(".nuspec"));
if (nuspec == null) return BadRequest("no nuspec from archive");
if (nuspec == null) return BadRequest(new { error = "no nuspec from archive" });
string pkgpath;
NuGetVersion version;
string pkgid;
@ -105,7 +105,7 @@ namespace nuget_host.Controllers
ViewData["msg"] = "existant";
ViewData["ecode"] = 1;
logger.LogWarning("400 : existant");
return BadRequest(ViewData);
return base.BadRequest(new { error = ModelState });
}
else
{