broken/ef
Paul Schneider 3 years ago
parent 74427cc15e
commit 3845e2c9c4
2 changed files with 6 additions and 6 deletions

@ -153,13 +153,13 @@ namespace isn.Controllers
// LOWER_ID URL string yes The package ID, lowercase // LOWER_ID URL string yes The package ID, lowercase
// LOWER_VERSION URL string yes The package version, normalized and lowercased // LOWER_VERSION URL string yes The package version, normalized and lowercased
// response 200 : the package // response 200 : the package
[HttpGet(_pkgRootPrefix + "/{id}/{lower}/{idf}.{lowerf}.nupkg")] [HttpGet(_pkgRootPrefix + "/{id}/{lower}/{idf}-{lowerf}.nupkg")]
public IActionResult GetPackage( public IActionResult GetPackage(
[FromRoute] string id, [FromRoute] string lower, [FromRoute] string id, [FromRoute] string lower,
[FromRoute] string idf, [FromRoute] string lowerf) [FromRoute] string idf, [FromRoute] string lowerf)
{ {
var pkgpath = Path.Combine(_nugetSettings.PackagesRootDir, var pkgpath = Path.Combine(_nugetSettings.PackagesRootDir,
id, lower, $"{idf}.{lowerf}.nupkg" id, lower, $"{id}-{lower}.nupkg"
); );
FileInfo pkgfi = new FileInfo(pkgpath); FileInfo pkgfi = new FileInfo(pkgpath);
@ -173,7 +173,7 @@ namespace isn.Controllers
// TODO GET {@id}/{LOWER_ID}/{LOWER_VERSION}/{LOWER_ID}.nuspec // TODO GET {@id}/{LOWER_ID}/{LOWER_VERSION}/{LOWER_ID}.nuspec
// response 200 : the nuspec // response 200 : the nuspec
[HttpGet(_pkgRootPrefix + "/{id}/{lower}/{idf}.{lowerf}.nuspec")] [HttpGet(_pkgRootPrefix + "/{id}/{lower}/{idf}-{lowerf}.nuspec")]
public IActionResult GetNuspec( public IActionResult GetNuspec(
[FromRoute][SafeName][Required] string id, [FromRoute][SafeName][Required] string id,
[FromRoute][SafeName][Required] string lower, [FromRoute][SafeName][Required] string lower,
@ -181,7 +181,7 @@ namespace isn.Controllers
[FromRoute][SafeName][Required] string lowerf) [FromRoute][SafeName][Required] string lowerf)
{ {
var pkgpath = Path.Combine(_nugetSettings.PackagesRootDir, var pkgpath = Path.Combine(_nugetSettings.PackagesRootDir,
id, lower, $"{idf}.{lowerf}.nuspec"); id, lower, $"{id}.nuspec");
FileInfo pkgfi = new FileInfo(pkgpath); FileInfo pkgfi = new FileInfo(pkgpath);
if (!pkgfi.Exists) if (!pkgfi.Exists)

@ -30,8 +30,8 @@ namespace isn.Data
[JsonIgnore] [JsonIgnore]
public virtual Package Package { get; set; } public virtual Package Package { get; set; }
public string NugetLink => $"/package/{PackageId}/{FullString}/{PackageId}.{FullString}.nupkg"; public string NugetLink => $"/package/{PackageId}/{FullString}/{PackageId}-{FullString}.nupkg";
public string NuspecLink => $"/package/{PackageId}/{FullString}/{PackageId}.{FullString}.nuspec"; public string NuspecLink => $"/package/{PackageId}/{FullString}/{PackageId}-{FullString}.nuspec";
} }
} }
Loading…