예제 #1
0
        public ActionResult DeleteFilter(int id)
        {
            var filter = _filterService.GetFilter(id);

            if (filter != null)
            {
                _filterService.Delete(filter);
                TempData["message"] = "Игра удалена";
                _offerService.SaveOffer();
            }
            return(RedirectToAction("GameList"));
        }
예제 #2
0
        public async Task Delete(int id)
        {
            var filter = _domainService.Find(id);

            if (filter == null)
            {
                throw SocialExceptions.FilterNotExists(id);
            }
            _domainService.Delete(id);
            await _notificationManager.NotifyDeleteFilter(filter.SiteId, filter.Id);
        }
예제 #3
0
        public async Task <IActionResult> Delete(string id)
        {
            var filter = await service.Find(id);

            if (filter.User != this.User.GetUserId())
            {
                return(Unauthorized());
            }

            // TODO: Deleting any connection like it doesn't matter.
            var result = await service.Delete(id);

            return(Ok(result));
        }
        public async Task <IActionResult> Delete([FromQuery] string id)
        {
            await _filterService.Delete(id);

            return(Ok());
        }