diff --git a/sample/src/Demo.Api/Extensions/WebApplicationExtensions.cs b/sample/src/Demo.Api/Extensions/WebApplicationExtensions.cs index e31c47b..6096c48 100644 --- a/sample/src/Demo.Api/Extensions/WebApplicationExtensions.cs +++ b/sample/src/Demo.Api/Extensions/WebApplicationExtensions.cs @@ -3,13 +3,15 @@ namespace Demo.Api.Extensions; public static class WebApplicationExtensions { + private static readonly string[] PatchHttpMethods = { "patch" }; + public static RouteHandlerBuilder MapPatch( this WebApplication app, string pattern, Delegate handler) => app.MapMethods( pattern, - new[] { "patch" }, + PatchHttpMethods, handler); public static IApplicationBuilder AddGlobalErrorHandler(