feat(events): add SignalR real-time event broadcasting to web UI
This commit is contained in:
1 parent
0d2f0574c9
commit
c5728fa810
5 files changed
+121
-9
No files matched your search
@@ -3,6 +3,7 @@ using Microsoft.AspNetCore.RateLimiting;
|
||||
using Scalar.AspNetCore;
|
||||
using Heimdall.Api.Filters;
|
||||
using Heimdall.Application;
|
||||
using Heimdall.Application.Services;
|
||||
using Heimdall.Infrastructure;
|
||||
using Heimdall.Api.Hubs;
|
||||
using Heimdall.Infrastructure.Data;
|
||||
@@ -61,6 +62,7 @@ else
|
||||
}
|
||||
|
||||
builder.Services.AddSignalR();
|
||||
builder.Services.AddScoped<IEventBroadcastService, EventBroadcastService>();
|
||||
builder.Services.AddScoped<IConfigBroadcastService, ConfigBroadcastService>();
|
||||
|
||||
builder.Services.AddOpenApi();
|
||||
@@ -261,5 +263,6 @@ app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.MapControllers();
|
||||
app.MapHub<ConfigHub>("/hubs/config");
|
||||
app.MapHub<EventsHub>("/hubs/events");
|
||||
|
||||
app.Run();
|
||||
Reference in new issue
Block a user