fixes the put
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
@ -19,6 +19,7 @@ namespace isnd.Services
|
||||
int skip, int take,bool prerelease = false,
|
||||
string packageType = null)
|
||||
{
|
||||
|
||||
var scope = dbContext.Packages
|
||||
.Include(p => p.Versions)
|
||||
.Where(
|
||||
@ -26,11 +27,13 @@ namespace isnd.Services
|
||||
&& (prerelease || p.Versions.Any(v => !v.IsPrerelease))
|
||||
&& (packageType == null || p.Versions.Any(v => v.Type == packageType))
|
||||
);
|
||||
var total = scope.Count();
|
||||
var pkgs = scope.Skip(skip).Take(take).ToArray();
|
||||
|
||||
return new IndexResult
|
||||
{
|
||||
totalHits = scope.Count(),
|
||||
data = scope.OrderBy(p => p.Id)
|
||||
.Skip(skip).Take(take).ToArray()
|
||||
totalHits = total,
|
||||
data = pkgs
|
||||
};
|
||||
}
|
||||
public AutoCompleteResult AutoComplete (string id,
|
||||
|
19
src/isnd/packages/isn/1.0.0/isn.nuspec
vendored
Normal file
19
src/isnd/packages/isn/1.0.0/isn.nuspec
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>isn</id>
|
||||
<version>1.0.0</version>
|
||||
<authors>isn</authors>
|
||||
<description>Package Description</description>
|
||||
<dependencies>
|
||||
<group targetFramework=".NETFramework4.7.2">
|
||||
<dependency id="Mono.Options" version="5.3.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Newtonsoft.Json" version="11.0.1" exclude="Build,Analyzers" />
|
||||
<dependency id="unleash.client" version="1.6.1" exclude="Build,Analyzers" />
|
||||
</group>
|
||||
</dependencies>
|
||||
<frameworkAssemblies>
|
||||
<frameworkAssembly assemblyName="System.Net.Http" targetFramework=".NETFramework4.7.2" />
|
||||
</frameworkAssemblies>
|
||||
</metadata>
|
||||
</package>
|
@ -1,4 +1,6 @@
|
||||
.body-container {
|
||||
|
||||
|
||||
.body-container {
|
||||
margin-top: 60px;
|
||||
padding-bottom:40px;
|
||||
}
|
||||
@ -38,5 +40,14 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
// Your variable overrides
|
||||
$body-bg: #000;
|
||||
$body-color: #111;
|
||||
$theme-colors: (
|
||||
"primary": #0074d9,
|
||||
"danger": #ff4136
|
||||
);
|
||||
|
||||
@import "../lib/bootstrap/scss/bootstrap";
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user