mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-23 21:16:52 +01:00
Make page sizes consistent across REST/GQL
This commit is contained in:
@@ -38,12 +38,12 @@ namespace Tgstation.Server.Host.Controllers
|
||||
/// <summary>
|
||||
/// Default size of <see cref="Paginated{TModel}"/> results.
|
||||
/// </summary>
|
||||
private const ushort DefaultPageSize = 10;
|
||||
public const ushort DefaultPageSize = 10;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum size of <see cref="Paginated{TModel}"/> results.
|
||||
/// </summary>
|
||||
private const ushort MaximumPageSize = 100;
|
||||
public const ushort MaximumPageSize = 100;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Api.ApiHeaders"/> for the operation.
|
||||
|
||||
@@ -319,6 +319,8 @@ namespace Tgstation.Server.Host.Core
|
||||
{
|
||||
pagingOptions.IncludeTotalCount = true;
|
||||
pagingOptions.RequirePagingBoundaries = false;
|
||||
pagingOptions.DefaultPageSize = ApiController.DefaultPageSize;
|
||||
pagingOptions.MaxPageSize = ApiController.MaximumPageSize;
|
||||
})
|
||||
.AddFiltering()
|
||||
.AddSorting()
|
||||
|
||||
Reference in New Issue
Block a user