fixes the put
This commit is contained in:
@ -19,6 +19,7 @@ namespace isnd.Services
|
||||
int skip, int take,bool prerelease = false,
|
||||
string packageType = null)
|
||||
{
|
||||
|
||||
var scope = dbContext.Packages
|
||||
.Include(p => p.Versions)
|
||||
.Where(
|
||||
@ -26,11 +27,13 @@ namespace isnd.Services
|
||||
&& (prerelease || p.Versions.Any(v => !v.IsPrerelease))
|
||||
&& (packageType == null || p.Versions.Any(v => v.Type == packageType))
|
||||
);
|
||||
var total = scope.Count();
|
||||
var pkgs = scope.Skip(skip).Take(take).ToArray();
|
||||
|
||||
return new IndexResult
|
||||
{
|
||||
totalHits = scope.Count(),
|
||||
data = scope.OrderBy(p => p.Id)
|
||||
.Skip(skip).Take(take).ToArray()
|
||||
totalHits = total,
|
||||
data = pkgs
|
||||
};
|
||||
}
|
||||
public AutoCompleteResult AutoComplete (string id,
|
||||
|
Reference in New Issue
Block a user