2025-02-25 20:32:59 +00:00

14 lines
506 B
C#

using EnotaryoPH.Web.Common.Hubs;
using Microsoft.AspNetCore.SignalR;
namespace EnotaryoPH.Web.Common.Services
{
public class NotificationService
{
private readonly IHubContext<NotificationHub> _hubContext;
public NotificationService(IHubContext<NotificationHub> hubContext) => _hubContext = hubContext;
public async Task NotifyUserAsync(string user_UID, string message) => await _hubContext.Clients.All.SendAsync("ReceiveUserNotification", user_UID, message);
}
}