serve
This commit is contained in:
@ -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)
|
||||
|
@ -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";
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user