From b92af3f68aae838fd0ad3ef2c1bf7f503abf195f Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sun, 22 Sep 2024 14:24:08 -0400 Subject: [PATCH] Make page sizes consistent across REST/GQL --- src/Tgstation.Server.Host/Controllers/ApiController.cs | 4 ++-- src/Tgstation.Server.Host/Core/Application.cs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Tgstation.Server.Host/Controllers/ApiController.cs b/src/Tgstation.Server.Host/Controllers/ApiController.cs index 005f61ca99..9b2b058010 100644 --- a/src/Tgstation.Server.Host/Controllers/ApiController.cs +++ b/src/Tgstation.Server.Host/Controllers/ApiController.cs @@ -38,12 +38,12 @@ namespace Tgstation.Server.Host.Controllers /// /// Default size of results. /// - private const ushort DefaultPageSize = 10; + public const ushort DefaultPageSize = 10; /// /// Maximum size of results. /// - private const ushort MaximumPageSize = 100; + public const ushort MaximumPageSize = 100; /// /// The for the operation. diff --git a/src/Tgstation.Server.Host/Core/Application.cs b/src/Tgstation.Server.Host/Core/Application.cs index 0b0b091a6e..d20e90aa56 100644 --- a/src/Tgstation.Server.Host/Core/Application.cs +++ b/src/Tgstation.Server.Host/Core/Application.cs @@ -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()