Files
work-club-manager/backend/WorkClub.Api/Middleware/MemberSyncMiddleware.cs

28 lines
531 B
C#
Raw Normal View History

using WorkClub.Api.Services;
namespace WorkClub.Api.Middleware;
public class MemberSyncMiddleware
{
private readonly RequestDelegate _next;
public MemberSyncMiddleware(RequestDelegate next)
{
2026-03-08 14:22:56 +01:00
//test commit
_next = next;
}
public async Task InvokeAsync(HttpContext context, MemberSyncService memberSyncService)
{
try
{
await memberSyncService.EnsureMemberExistsAsync(context);
}
catch
{
}
await _next(context);
}
}