Beispiel #1
0
        public async Task <IActionResult> SubscribersUnderNotification([FromBody] SubscriberUnderNotificationWrapper wrapper)
        {
            try
            {
                //add subscribers to the incident
                await _dao.AddSubscribersToIncident(wrapper.SubscriberUnderNotification);

                //return all possible subscribers
                return(new OkObjectResult("Successfully added subscribers to incident"));
            }
            catch (Exception e)
            {
                _logger.LogInformation($"Error updating subscribers under notification. The error was: {e.Message}, stack trace was: {e.StackTrace}");
                return(BadRequest($"Error updating subscribers under notification. The error was: {e.Message}"));
            }
        }