Initial QMAX production app
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
|
||||
namespace QMax.Api.Infrastructure.Hubs;
|
||||
|
||||
[Authorize]
|
||||
public sealed class QMaxHub : Hub
|
||||
{
|
||||
public Task JoinChat(string chatId)
|
||||
{
|
||||
return Groups.AddToGroupAsync(Context.ConnectionId, $"chat:{chatId}");
|
||||
}
|
||||
|
||||
public Task LeaveChat(string chatId)
|
||||
{
|
||||
return Groups.RemoveFromGroupAsync(Context.ConnectionId, $"chat:{chatId}");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user