Files
work-club-manager/backend/WorkClub.Api/Middleware/MemberSyncMiddleware.cs
Urs Rudolph b4b9d23429
All checks were successful
CI Pipeline / Backend Build & Test (push) Successful in 1m25s
CI Pipeline / Frontend Lint, Test & Build (push) Successful in 1m3s
CI Pipeline / Infrastructure Validation (push) Successful in 4s
next ci test
2026-03-08 14:27:08 +01:00

27 lines
509 B
C#

using WorkClub.Api.Services;
namespace WorkClub.Api.Middleware;
public class MemberSyncMiddleware
{
private readonly RequestDelegate _next;
public MemberSyncMiddleware(RequestDelegate next)
{
_next = next;
}
public async Task InvokeAsync(HttpContext context, MemberSyncService memberSyncService)
{
try
{
await memberSyncService.EnsureMemberExistsAsync(context);
}
catch
{
}
await _next(context);
}
}