diff --git a/Tsi1.Api/Tsi1.Api/SignalR/ChatHub.cs b/Tsi1.Api/Tsi1.Api/SignalR/ChatHub.cs index 18897e29327892850559a23559d2e4dc4eaac1da..94a4163febf38123f45b1f75a0afe775eeb9106f 100644 --- a/Tsi1.Api/Tsi1.Api/SignalR/ChatHub.cs +++ b/Tsi1.Api/Tsi1.Api/SignalR/ChatHub.cs @@ -1,4 +1,5 @@ using AutoMapper; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.SignalR; using Microsoft.EntityFrameworkCore; @@ -14,6 +15,7 @@ using Tsi1.DataLayer.Entities; namespace Tsi1.Api.SignalR { + [Authorize] public class ChatHub : Hub { private readonly IMapper _mapper; @@ -29,7 +31,7 @@ namespace Tsi1.Api.SignalR _presenceHub = presenceHub; _mapper = mapper; _messageService = messageService; - _chatService = chatService + _chatService = chatService; }