Package Version constraints
This commit is contained in:
@ -14,18 +14,17 @@ namespace isnd.Data.Catalog
|
||||
Items = new List<CatalogPage>();
|
||||
}
|
||||
|
||||
public PackageRegistration(string bid, string id, string apiBase, Packages.Package pkg) : base(bid + $"/{id}/index.json")
|
||||
public PackageRegistration(string bid, string apiBase, Packages.Package pkg) : base(bid + $"/{pkg.Id}/index.json")
|
||||
{
|
||||
Items = new List<CatalogPage>
|
||||
{
|
||||
new CatalogPage(bid, id, apiBase, pkg.Versions)
|
||||
new CatalogPage(bid, pkg.Id, apiBase, pkg.Versions)
|
||||
};
|
||||
|
||||
if (pkg.Versions.Count>0)
|
||||
{
|
||||
CommitId = pkg.Versions.Max(v=>v.CommitNId).ToString();
|
||||
CommitTimeStamp = pkg.Versions.Max(v=>v.LatestCommit.CommitTimeStamp);
|
||||
}
|
||||
|
||||
CommitId = pkg.LatestCommit.CommitId;
|
||||
CommitTimeStamp = pkg.LatestCommit.CommitTimeStamp;
|
||||
|
||||
}
|
||||
|
||||
[JsonProperty("count")]
|
||||
|
Reference in New Issue
Block a user