fixes the put
This commit is contained in:
parent
e356636539
commit
fff4599ff4
8 changed files with 123 additions and 17 deletions
|
|
@ -13,6 +13,7 @@ using NuGet.Packaging.Core;
|
|||
using NuGet.Versioning;
|
||||
using isn.Data;
|
||||
using isn.Helpers;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace isn.Controllers
|
||||
{
|
||||
|
|
@ -26,7 +27,7 @@ namespace isn.Controllers
|
|||
try
|
||||
{
|
||||
var clientVersionId = Request.Headers["X-NuGet-Client-Version"];
|
||||
var apiKey = Request.Headers["X-NuGet-ApiKey"];
|
||||
string apiKey = Request.Headers["X-NuGet-ApiKey"][0];
|
||||
ViewData["versionId"] = typeof(PackagesController).Assembly.FullName;
|
||||
var files = new List<string>();
|
||||
ViewData["files"] = files;
|
||||
|
|
@ -39,7 +40,7 @@ namespace isn.Controllers
|
|||
return Unauthorized();
|
||||
}
|
||||
|
||||
foreach (var file in Request.Form.Files)
|
||||
foreach (IFormFile file in Request.Form.Files)
|
||||
{
|
||||
string initpath = Path.Combine(Environment.GetEnvironmentVariable("TEMP") ??
|
||||
Environment.GetEnvironmentVariable("TMP") ?? "/tmp",
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ namespace isn.Controllers
|
|||
}
|
||||
if (semVerLevel != defaultSemVer)
|
||||
{
|
||||
ModelState.AddModelError("semVerLevel", defaultSemVer + " expected");
|
||||
_logger.LogWarning("Unexpected sementic version : "+semVerLevel);
|
||||
}
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue