mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 21:48:12 -05:00
rename notifications api endpoint to send
This commit is contained in:
parent
816bf1546e
commit
5ecd45abd6
@ -141,7 +141,7 @@ namespace Bit.Core.Services
|
|||||||
{
|
{
|
||||||
var contextId = GetContextIdentifier(excludeCurrentContext);
|
var contextId = GetContextIdentifier(excludeCurrentContext);
|
||||||
var request = new PushNotificationData<T>(type, payload, contextId);
|
var request = new PushNotificationData<T>(type, payload, contextId);
|
||||||
await SendAsync(HttpMethod.Post, "notifications", request);
|
await SendAsync(HttpMethod.Post, "send", request);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetContextIdentifier(bool excludeCurrentContext)
|
private string GetContextIdentifier(bool excludeCurrentContext)
|
||||||
|
@ -12,17 +12,17 @@ namespace Bit.Notifications
|
|||||||
{
|
{
|
||||||
[Authorize("Internal")]
|
[Authorize("Internal")]
|
||||||
[SelfHosted(SelfHostedOnly = true)]
|
[SelfHosted(SelfHostedOnly = true)]
|
||||||
public class NotificationsController : Controller
|
public class SendController : Controller
|
||||||
{
|
{
|
||||||
private readonly IHubContext<NotificationsHub> _hubContext;
|
private readonly IHubContext<NotificationsHub> _hubContext;
|
||||||
|
|
||||||
public NotificationsController(IHubContext<NotificationsHub> hubContext)
|
public SendController(IHubContext<NotificationsHub> hubContext)
|
||||||
{
|
{
|
||||||
_hubContext = hubContext;
|
_hubContext = hubContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("~/notifications")]
|
[HttpPost("~/send")]
|
||||||
public async Task PostNotification()
|
public async Task PostSend()
|
||||||
{
|
{
|
||||||
using(var reader = new StreamReader(Request.Body, Encoding.UTF8))
|
using(var reader = new StreamReader(Request.Body, Encoding.UTF8))
|
||||||
{
|
{
|
Loading…
x
Reference in New Issue
Block a user