feat(Backend): update API gateway and websocket hubs

This commit is contained in:
2026-08-09 21:32:52 +02:00
parent fdf4b6efcb
commit a9553e9fbf
66 changed files with 188878 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
using Microsoft.AspNetCore.SignalR;
using System.Threading.Tasks;
using FinlyticCore.Dtos.News;
namespace FinlyticBackend.Hubs;
/// <summary>
/// SignalR Hub for real-time news delivery to connected clients.
/// </summary>
public class NewsHub : Hub
{
// Clients can call this to join specific symbol groups if needed later
public async Task SubscribeToSymbol(string symbol)
{
await Groups.AddToGroupAsync(Context.ConnectionId, symbol.ToUpperInvariant());
}
public async Task UnsubscribeFromSymbol(string symbol)
{
await Groups.RemoveFromGroupAsync(Context.ConnectionId, symbol.ToUpperInvariant());
}
}