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:
25
src/Hub/Controllers/EventsController.cs
Normal file
25
src/Hub/Controllers/EventsController.cs
Normal 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.");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user