Added id ordering as postgres would return the last changed elements first which breaks pagination
This commit is contained in:
@@ -40,6 +40,7 @@ public class NodeAllocationsController : Controller
|
||||
|
||||
var allocations = await AllocationRepository
|
||||
.Get()
|
||||
.OrderBy(x => x.Id)
|
||||
.Skip(page * pageSize)
|
||||
.Take(pageSize)
|
||||
.Where(x => x.Node.Id == nodeId)
|
||||
|
||||
@@ -39,6 +39,7 @@ public class NodesController : Controller
|
||||
var count = await query.CountAsync();
|
||||
|
||||
var items = await query
|
||||
.OrderBy(x => x.Id)
|
||||
.Skip(page * pageSize)
|
||||
.Take(pageSize)
|
||||
.ToArrayAsync();
|
||||
|
||||
Reference in New Issue
Block a user