Skip to content

Commit

Permalink
Fix in client extensions.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Dec 10, 2019
1 parent 7880ad2 commit 1a436fc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static async Task<SquidexEntities<TEntity, TData>> GetAllAsync<TEntity, T
entities.Total = getResult.Total;
entities.Items.AddRange(getResult.Items);

query.Skip += entities.Items.Count;
query.Skip = entities.Items.Count;
}
while (query.Skip < entities.Total);

Expand All @@ -34,7 +34,7 @@ public static async Task<SquidexEntities<TEntity, TData>> GetAllAsync<TEntity, T

public static async Task<AssetEntities> GetAllAssetsAsync(this SquidexAssetClient assetClient, int batchSize = 200)
{
var query = new ODataQuery { Top = batchSize };
var query = new ODataQuery { Top = batchSize, Skip = 0 };

var entities = new AssetEntities();
do
Expand All @@ -44,7 +44,7 @@ public static async Task<AssetEntities> GetAllAssetsAsync(this SquidexAssetClien
entities.Total = getResult.Total;
entities.Items.AddRange(getResult.Items);

query.Skip += entities.Items.Count;
query.Skip = entities.Items.Count;
}
while (query.Skip < entities.Total);

Expand Down

0 comments on commit 1a436fc

Please sign in to comment.