1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 16:12:49 -05:00

[PM-17562] Revert event route optimization (#5766)

This commit is contained in:
Brant DeBow
2025-05-05 08:05:38 -04:00
committed by GitHub
parent 75a2da3c4b
commit 4b49b04409
4 changed files with 101 additions and 16 deletions

View File

@ -1,5 +1,4 @@
using System.Globalization;
using Bit.Core;
using Bit.Core.AdminConsole.Services.Implementations;
using Bit.Core.AdminConsole.Services.NoopImplementations;
using Bit.Core.Context;
@ -94,13 +93,7 @@ public class Startup
services.AddKeyedSingleton<IEventWriteService, NoopEventWriteService>("broadcast");
}
}
services.AddScoped<IEventWriteService>(sp =>
{
var featureService = sp.GetRequiredService<IFeatureService>();
var key = featureService.IsEnabled(FeatureFlagKeys.EventBasedOrganizationIntegrations)
? "broadcast" : "storage";
return sp.GetRequiredKeyedService<IEventWriteService>(key);
});
services.AddScoped<IEventWriteService, EventRouteService>();
services.AddScoped<IEventService, EventService>();
services.AddOptionality();