mirror of
https://github.com/fergalmoran/podnoms.git
synced 2026-02-07 08:15:02 +00:00
14 lines
450 B
C#
14 lines
450 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.SignalR;
|
|
|
|
namespace PodNoms.Api.Services.Hubs {
|
|
[Authorize]
|
|
public class UserUpdatesHub : Hub {
|
|
public async Task SendMessage(string userId, string message) {
|
|
string timestamp = DateTime.Now.ToShortTimeString();
|
|
await Clients.All.SendAsync(userId, timestamp, userId, message);
|
|
}
|
|
}
|
|
} |