From 80dc2e412cb311b9129a8473304f96d4c8ed261e Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Mon, 12 Aug 2024 21:36:07 +0300 Subject: [PATCH] refactor: change Invoke to async --- Endpoint/Middleware/CustomExceptionHandlerMiddleware.cs | 2 +- Endpoint/Middleware/JwtRevocationMiddleware.cs | 2 +- Endpoint/Middleware/MaintenanceModeMiddleware.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Endpoint/Middleware/CustomExceptionHandlerMiddleware.cs b/Endpoint/Middleware/CustomExceptionHandlerMiddleware.cs index 62c41e2..5800f7d 100644 --- a/Endpoint/Middleware/CustomExceptionHandlerMiddleware.cs +++ b/Endpoint/Middleware/CustomExceptionHandlerMiddleware.cs @@ -11,7 +11,7 @@ namespace Mirea.Api.Endpoint.Middleware; public class CustomExceptionHandlerMiddleware(RequestDelegate next) { - public async Task Invoke(HttpContext context) + public async Task InvokeAsync(HttpContext context) { try { diff --git a/Endpoint/Middleware/JwtRevocationMiddleware.cs b/Endpoint/Middleware/JwtRevocationMiddleware.cs index 97818c7..5d657f8 100644 --- a/Endpoint/Middleware/JwtRevocationMiddleware.cs +++ b/Endpoint/Middleware/JwtRevocationMiddleware.cs @@ -6,7 +6,7 @@ namespace Mirea.Api.Endpoint.Middleware; public class JwtRevocationMiddleware(RequestDelegate next) { - public async Task Invoke(HttpContext context, IRevokedToken revokedTokenStore) + public async Task InvokeAsync(HttpContext context, IRevokedToken revokedTokenStore) { if (context.Request.Headers.ContainsKey("Authorization")) { diff --git a/Endpoint/Middleware/MaintenanceModeMiddleware.cs b/Endpoint/Middleware/MaintenanceModeMiddleware.cs index 2bd5d3b..128ed7c 100644 --- a/Endpoint/Middleware/MaintenanceModeMiddleware.cs +++ b/Endpoint/Middleware/MaintenanceModeMiddleware.cs @@ -13,7 +13,7 @@ public class MaintenanceModeMiddleware(RequestDelegate next, IMaintenanceModeSer return endpoint?.Metadata.GetMetadata() != null; } - public async Task Invoke(HttpContext context) + public async Task InvokeAsync(HttpContext context) { if (!maintenanceModeService.IsMaintenanceMode && !maintenanceModeNotConfigureService.IsMaintenanceMode || IsIgnoreMaintenanceMode(context)) await next(context);