Пример #1
0
        public async Task <IActionResult> DeleteAnnouncement([FromRoute] int notificationContextId)
        {
            NotificationContext notificationContext = await _notificationService.GetAnnouncementByIdAsync(notificationContextId);

            if (notificationContext == null)
            {
                return(BadRequest("Announcement not found"));
            }
            await _notificationService.DeleteAnnouncementAsync(notificationContext);

            return(Ok());
        }