From 84418fec32f1bfe59c6851fa35ac54177c2dc69e Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Tue, 23 Jul 2024 13:29:30 -0700 Subject: [PATCH] Fix code for .NET 8 new warnings --- src/dotnet/APIView/APIViewWeb/Account/TestAuthHandler.cs | 2 +- src/dotnet/APIView/APIViewWeb/Extensions/HttpExtensions.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dotnet/APIView/APIViewWeb/Account/TestAuthHandler.cs b/src/dotnet/APIView/APIViewWeb/Account/TestAuthHandler.cs index 2f4a27e2a25..459e8981879 100644 --- a/src/dotnet/APIView/APIViewWeb/Account/TestAuthHandler.cs +++ b/src/dotnet/APIView/APIViewWeb/Account/TestAuthHandler.cs @@ -11,7 +11,7 @@ namespace APIViewWeb.Account { public class TestAuthHandler : AuthenticationHandler { - public TestAuthHandler(IOptionsMonitor options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) { } + public TestAuthHandler(IOptionsMonitor options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder) { } protected override Task HandleAuthenticateAsync() { diff --git a/src/dotnet/APIView/APIViewWeb/Extensions/HttpExtensions.cs b/src/dotnet/APIView/APIViewWeb/Extensions/HttpExtensions.cs index 473331ef184..15b3eb1c649 100644 --- a/src/dotnet/APIView/APIViewWeb/Extensions/HttpExtensions.cs +++ b/src/dotnet/APIView/APIViewWeb/Extensions/HttpExtensions.cs @@ -13,8 +13,8 @@ public static void AddPaginationHeader(this HttpResponse response, PaginationHea { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }; - response.Headers.Add("Pagination", JsonSerializer.Serialize(header, options)); - response.Headers.Add("Access-Control-Expose-Headers", "Pagination"); + response.Headers.Append("Pagination", JsonSerializer.Serialize(header, options)); + response.Headers.Append("Access-Control-Expose-Headers", "Pagination"); } } }