Added signalR logout
This commit is contained in:
@@ -8,6 +8,8 @@ using System.Linq;
|
||||
using static Step.Utils.LanguageController;
|
||||
using Step.Model.DTOModels;
|
||||
using System.Globalization;
|
||||
using Microsoft.AspNet.SignalR;
|
||||
using Step.Controllers.SignalR;
|
||||
|
||||
namespace Step.Controllers.WebApi
|
||||
{
|
||||
@@ -33,7 +35,9 @@ namespace Step.Controllers.WebApi
|
||||
// Delete all the user session on the machine
|
||||
sessionsController.DeleteSessionsByUserAndMachineId(Convert.ToInt32(machineId.Value), Convert.ToInt32(userId.Value));
|
||||
}
|
||||
|
||||
// Send to the clients the id of the disconnected user
|
||||
var context = GlobalHost.ConnectionManager.GetHubContext<NcHub>();
|
||||
context.Clients.All.logout(new { id = userId.Value });
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user