Catalog packages
This commit is contained in:
parent
d8bfdc293d
commit
b7dae240cd
10 changed files with 413 additions and 41 deletions
|
|
@ -152,7 +152,8 @@ namespace isnd.Controllers
|
|||
Patch = version.Patch,
|
||||
IsPrerelease = version.IsPrerelease,
|
||||
FullString = version.ToFullString(),
|
||||
Type = "<null-type>"
|
||||
Type = "<null-type>",
|
||||
LatestCommit = commit
|
||||
});
|
||||
else
|
||||
foreach (var type in types)
|
||||
|
|
@ -165,7 +166,8 @@ namespace isnd.Controllers
|
|||
Patch = version.Patch,
|
||||
IsPrerelease = version.IsPrerelease,
|
||||
FullString = version.ToFullString(),
|
||||
Type = type.Name
|
||||
Type = type.Name,
|
||||
LatestCommit = commit
|
||||
};
|
||||
_dbContext.PackageVersions.Add(pkgver);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,9 +105,16 @@ namespace isnd.Controllers
|
|||
[HttpGet(_pkgRootPrefix)]
|
||||
public IActionResult Index()
|
||||
{
|
||||
// https://docs.microsoft.com/en-us/nuget/api/catalog-resource#versioning
|
||||
// https://docs.microsoft.com/en-us/nuget/api/catalog-resource#versioning
|
||||
return Ok(PackageManager.CurrentCatalogIndex);
|
||||
}
|
||||
|
||||
[HttpGet(_pkgRootPrefix + "/index-{id}")]
|
||||
public IActionResult Index(string id)
|
||||
{
|
||||
// https://docs.microsoft.com/en-us/nuget/api/catalog-resource#versioning
|
||||
return Ok(PackageManager.CurrentCatalogPages[int.Parse(id)]);
|
||||
}
|
||||
|
||||
// GET /autocomplete?id=isn.protocol&prerelease=true
|
||||
[HttpGet(_pkgRootPrefix + "/autocomplete")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue