mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
Adding paging to notifications grid
This commit is contained in:
@@ -40,12 +40,15 @@ namespace BTCPayServer.Controllers
|
||||
|
||||
var model = new IndexViewModel()
|
||||
{
|
||||
Skip = skip,
|
||||
Count = count,
|
||||
Items = _db.Notifications
|
||||
.OrderByDescending(a => a.Created)
|
||||
.Skip(skip).Take(count)
|
||||
.Where(a => a.ApplicationUserId == userId)
|
||||
.Select(a => a.ViewModel())
|
||||
.ToList()
|
||||
.ToList(),
|
||||
Total = _db.Notifications.Where(a => a.ApplicationUserId == userId).Count()
|
||||
};
|
||||
|
||||
return View(model);
|
||||
|
||||
Reference in New Issue
Block a user