refactor: change Invoke to async
This commit is contained in:
parent
b1250616a7
commit
80dc2e412c
@ -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
|
||||
{
|
||||
|
@ -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"))
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ public class MaintenanceModeMiddleware(RequestDelegate next, IMaintenanceModeSer
|
||||
return endpoint?.Metadata.GetMetadata<MaintenanceModeIgnoreAttribute>() != null;
|
||||
}
|
||||
|
||||
public async Task Invoke(HttpContext context)
|
||||
public async Task InvokeAsync(HttpContext context)
|
||||
{
|
||||
if (!maintenanceModeService.IsMaintenanceMode && !maintenanceModeNotConfigureService.IsMaintenanceMode || IsIgnoreMaintenanceMode(context))
|
||||
await next(context);
|
||||
|
Loading…
Reference in New Issue
Block a user