1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

max recent clients paginated

This commit is contained in:
RaidMax
2022-04-25 16:12:25 -05:00
parent 994737790e
commit eec6fb4997
4 changed files with 58 additions and 28 deletions

View File

@ -902,7 +902,7 @@ namespace SharedLibraryCore.Services
/// gets the 10 most recently added clients to IW4MAdmin
/// </summary>
/// <returns></returns>
public async Task<IList<PlayerInfo>> GetRecentClients()
public async Task<IList<PlayerInfo>> GetRecentClients(PaginationRequest request)
{
var startOfPeriod = DateTime.UtcNow.AddHours(-24);
@ -917,7 +917,9 @@ namespace SharedLibraryCore.Services
Name = client.CurrentAlias.Name,
IPAddress = client.CurrentAlias.IPAddress.ConvertIPtoString(),
LastConnection = client.FirstConnection
});
})
.Skip(request.Offset)
.Take(request.Count);
var clientList = await iqClients.ToListAsync();
foreach (var client in clientList)