Переместил ChatHub в слой Application

This commit is contained in:
2026-08-29 17:08:44 +03:00
parent 0bea967bcf
commit d141969e45
6 changed files with 25 additions and 3 deletions
+14
View File
@@ -0,0 +1,14 @@
using AMessanger.Core.Models;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Logging;
namespace AMessanger.Application.Hubs;
public class ChatHub(ILogger<ChatHub> logger) : Hub
{
public async Task SendMessage(Message message)
{
logger.LogInformation($"{message.UserName}: {message.Content}");
await Clients.All.SendAsync("ReceiveMessage", message);
}
}