Commit Id and TimerStamps

This commit is contained in:
2023-04-30 23:40:39 +01:00
parent cea05fe8ff
commit 06b0115405
10 changed files with 48 additions and 41 deletions

View File

@ -281,6 +281,8 @@ namespace isnd.Services
.SingleAsync(p => p.Id.ToLower() == query.Query);
if (scope.Versions.Count==0) return null;
string bid = $"{apiBase}{ApiConfig.Registration}";
foreach (var version in scope.Versions)
version.LatestCommit = dbContext.Commits.Single(c=>c.Id == version.CommitNId);
return
new PackageRegistration(bid, apiBase, scope);
}
@ -299,6 +301,11 @@ namespace isnd.Services
.ToListAsync()
);
var pkgs = scope;
foreach (var pkg in pkgs)
{
foreach (var version in pkg.Versions)
version.LatestCommit = dbContext.Commits.Single(c=>c.Id == version.CommitNId);
}
return pkgs.Select(p => new PackageRegistration(bid, apiBase, p));
}