예제 #1
0
        public async Task <IActionResult> ResignEvent(Guid id)
        {
            var currenEvent = await _eventService.GetEvent(id);

            var currentUser = await _userManager.GetUserAsync(User);

            currenEvent.CurrentPeopleNumber--;
            var successful = await _eventService.ResignEventAsync(currenEvent, currentUser);

            if (!successful)
            {
                return(RedirectToAction("Index"));
            }

            return(RedirectToAction("Index"));
        }