1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 17:42:49 -05:00

stub out signalr sync hub

This commit is contained in:
Kyle Spearrin
2018-08-02 12:14:33 -04:00
parent 14956f6383
commit 8b53ab2945
13 changed files with 460 additions and 84 deletions

View File

@ -0,0 +1,25 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.SignalR;
namespace Bit.Hub
{
[Authorize("Application")]
public class EventsController : Controller
{
private readonly IHubContext<SyncHub> _syncHubContext;
public EventsController(IHubContext<SyncHub> syncHubContext)
{
_syncHubContext = syncHubContext;
}
[HttpGet("~/events")]
public async Task GetTest()
{
await _syncHubContext.Clients.All.SendAsync("ReceiveMessage", "From API.");
}
}
}