mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 15:07:03 +01:00
Merge pull request #1361 from spookydonut/paginateditemscount
Add totalItems to paginated results
This commit is contained in:
+2
-2
@@ -5,8 +5,8 @@
|
||||
<PropertyGroup>
|
||||
<TgsCoreVersion>4.16.2</TgsCoreVersion>
|
||||
<TgsConfigVersion>4.1.0</TgsConfigVersion>
|
||||
<TgsApiVersion>9.3.1</TgsApiVersion>
|
||||
<TgsApiLibraryVersion>9.3.2</TgsApiLibraryVersion>
|
||||
<TgsApiVersion>9.4.0</TgsApiVersion>
|
||||
<TgsApiLibraryVersion>9.4.0</TgsApiLibraryVersion>
|
||||
<TgsClientVersion>10.4.1</TgsClientVersion>
|
||||
<TgsDmapiVersion>6.0.5</TgsDmapiVersion>
|
||||
<TgsInteropVersion>5.3.0</TgsInteropVersion>
|
||||
|
||||
@@ -24,5 +24,10 @@ namespace Tgstation.Server.Api.Models.Response
|
||||
/// The current size of pages in the query.
|
||||
/// </summary>
|
||||
public int PageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total items across all pages.
|
||||
/// </summary>
|
||||
public int TotalItems { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,6 +417,7 @@ namespace Tgstation.Server.Host.Controllers
|
||||
Content = finalResults,
|
||||
PageSize = pageSize,
|
||||
TotalPages = (ushort)(totalResults / pageSize) + carryTheOne,
|
||||
TotalItems = totalResults,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user