From 3845e2c9c4a9afcfc8687c8ae33f341b8267719f Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Thu, 12 Aug 2021 01:04:39 +0100 Subject: [PATCH] serve --- src/isnd/Controllers/PackagesController.cs | 8 ++++---- src/isnd/Data/PackageVersion.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/isnd/Controllers/PackagesController.cs b/src/isnd/Controllers/PackagesController.cs index ae1e2ae..fba2131 100644 --- a/src/isnd/Controllers/PackagesController.cs +++ b/src/isnd/Controllers/PackagesController.cs @@ -153,13 +153,13 @@ namespace isn.Controllers // LOWER_ID URL string yes The package ID, lowercase // LOWER_VERSION URL string yes The package version, normalized and lowercased // response 200 : the package - [HttpGet(_pkgRootPrefix + "/{id}/{lower}/{idf}.{lowerf}.nupkg")] + [HttpGet(_pkgRootPrefix + "/{id}/{lower}/{idf}-{lowerf}.nupkg")] public IActionResult GetPackage( [FromRoute] string id, [FromRoute] string lower, [FromRoute] string idf, [FromRoute] string lowerf) { var pkgpath = Path.Combine(_nugetSettings.PackagesRootDir, - id, lower, $"{idf}.{lowerf}.nupkg" + id, lower, $"{id}-{lower}.nupkg" ); FileInfo pkgfi = new FileInfo(pkgpath); @@ -173,7 +173,7 @@ namespace isn.Controllers // TODO GET {@id}/{LOWER_ID}/{LOWER_VERSION}/{LOWER_ID}.nuspec // response 200 : the nuspec - [HttpGet(_pkgRootPrefix + "/{id}/{lower}/{idf}.{lowerf}.nuspec")] + [HttpGet(_pkgRootPrefix + "/{id}/{lower}/{idf}-{lowerf}.nuspec")] public IActionResult GetNuspec( [FromRoute][SafeName][Required] string id, [FromRoute][SafeName][Required] string lower, @@ -181,7 +181,7 @@ namespace isn.Controllers [FromRoute][SafeName][Required] string lowerf) { var pkgpath = Path.Combine(_nugetSettings.PackagesRootDir, - id, lower, $"{idf}.{lowerf}.nuspec"); + id, lower, $"{id}.nuspec"); FileInfo pkgfi = new FileInfo(pkgpath); if (!pkgfi.Exists) diff --git a/src/isnd/Data/PackageVersion.cs b/src/isnd/Data/PackageVersion.cs index 3b08fb6..7cd6a86 100644 --- a/src/isnd/Data/PackageVersion.cs +++ b/src/isnd/Data/PackageVersion.cs @@ -30,8 +30,8 @@ namespace isn.Data [JsonIgnore] public virtual Package Package { get; set; } - public string NugetLink => $"/package/{PackageId}/{FullString}/{PackageId}.{FullString}.nupkg"; - public string NuspecLink => $"/package/{PackageId}/{FullString}/{PackageId}.{FullString}.nuspec"; + public string NugetLink => $"/package/{PackageId}/{FullString}/{PackageId}-{FullString}.nupkg"; + public string NuspecLink => $"/package/{PackageId}/{FullString}/{PackageId}-{FullString}.nuspec"; } } \ No newline at end of file