using Microsoft.AspNetCore.SignalR;

namespace Managing.Application.Hubs;

public class BacktestHub : Hub
{
    public async override Task OnConnectedAsync()
    {
        await base.OnConnectedAsync();
        await Clients.Caller.SendAsync("Message", $"Connected successfully on backtest hub. ConnectionId : {Context.ConnectionId}");
    }

    public async Task SubscribeBots() =>
        await Clients.All.SendAsync("BacktestsSubscription", "Successfully subscribed");
}
