From 5ecd45abd679b658c3adb867dae25d6f2b31cc56 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 24 Aug 2018 20:31:17 -0400 Subject: [PATCH] rename notifications api endpoint to send --- .../NotificationsApiPushNotificationService.cs | 2 +- .../{NotificationsController.cs => SendController.cs} | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) rename src/Notifications/Controllers/{NotificationsController.cs => SendController.cs} (82%) diff --git a/src/Core/Services/Implementations/NotificationsApiPushNotificationService.cs b/src/Core/Services/Implementations/NotificationsApiPushNotificationService.cs index 20ed83d721..2aeb10326d 100644 --- a/src/Core/Services/Implementations/NotificationsApiPushNotificationService.cs +++ b/src/Core/Services/Implementations/NotificationsApiPushNotificationService.cs @@ -141,7 +141,7 @@ namespace Bit.Core.Services { var contextId = GetContextIdentifier(excludeCurrentContext); var request = new PushNotificationData(type, payload, contextId); - await SendAsync(HttpMethod.Post, "notifications", request); + await SendAsync(HttpMethod.Post, "send", request); } private string GetContextIdentifier(bool excludeCurrentContext) diff --git a/src/Notifications/Controllers/NotificationsController.cs b/src/Notifications/Controllers/SendController.cs similarity index 82% rename from src/Notifications/Controllers/NotificationsController.cs rename to src/Notifications/Controllers/SendController.cs index c57b56c137..d53982d90a 100644 --- a/src/Notifications/Controllers/NotificationsController.cs +++ b/src/Notifications/Controllers/SendController.cs @@ -12,17 +12,17 @@ namespace Bit.Notifications { [Authorize("Internal")] [SelfHosted(SelfHostedOnly = true)] - public class NotificationsController : Controller + public class SendController : Controller { private readonly IHubContext _hubContext; - public NotificationsController(IHubContext hubContext) + public SendController(IHubContext hubContext) { _hubContext = hubContext; } - [HttpPost("~/notifications")] - public async Task PostNotification() + [HttpPost("~/send")] + public async Task PostSend() { using(var reader = new StreamReader(Request.Body, Encoding.UTF8)) {