Repair and add SignalR
parent
6dc7a1674d
commit
ad6beb6366
|
@ -20,14 +20,14 @@ namespace API_SequentMicrosystems.Hubs
|
|||
await Clients.All.SendAsync("SyncRequested", clientID);
|
||||
}
|
||||
|
||||
public async Task SyncPoints(string clientID, object o)
|
||||
public async Task SyncPoints(string clientID, string data)
|
||||
{
|
||||
await Clients.All.SendAsync("SyncPointsData", clientID, o);
|
||||
await Clients.All.SendAsync("SyncPointsData", clientID, data);
|
||||
}
|
||||
|
||||
public async Task SyncRTD8TMChart(string clientID, object o)
|
||||
public async Task SyncRTD8TMChart(string clientID, string data)
|
||||
{
|
||||
await Clients.All.SendAsync("SyncRTD8TMChartData", clientID, o);
|
||||
await Clients.All.SendAsync("SyncRTD8TMChartData", clientID, data);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@ using API_SequentMicrosystems.Hubs;
|
|||
using API_SequentMicrosystems.Services;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace API_SequentMicrosystems
|
||||
{
|
||||
|
@ -17,6 +15,7 @@ namespace API_SequentMicrosystems
|
|||
|
||||
builder.Services.AddControllers().AddNewtonsoftJson();
|
||||
builder.Services.AddSignalR();
|
||||
builder.Services.AddSignalRCore();
|
||||
|
||||
builder.Services.AddSingleton<RTDDAService>();
|
||||
builder.Services.AddSingleton<PointsService>();
|
||||
|
@ -63,7 +62,8 @@ namespace API_SequentMicrosystems
|
|||
app.Services.GetService<RTDDAService>();
|
||||
app.Services.GetService<PointsService>();
|
||||
|
||||
app.MapHub<SyncHub>("/signalr/sync");
|
||||
app.MapHub<SyncHub>("/signalr");
|
||||
app.UseWebSockets();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
|
|
Loading…
Reference in New Issue