Make page sizes consistent across REST/GQL

This commit is contained in:
Jordan Dominion
2024-09-22 14:24:08 -04:00
parent 00467fd77e
commit b92af3f68a
2 changed files with 4 additions and 2 deletions
@@ -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()