public ActionResult <AngularPushNotification> SendNotification([FromBody] AngularPushNotification notification) { try { string message = notification.ToJson(); foreach (SubscriptionDTO subscription in subscriptionsService.GetAll()) { notificationsManager.SendNotification(subscription, message); } return(Ok(notification)); } catch (Exception exc) { return(StatusCode(StatusCodes.Status500InternalServerError, $"Something went wrong: {exc.Message}")); } }