Пример #1
0
        public ActionResult CancelJoinRequest(int requestID)
        {
            var request = partyJoinRequestRepository.GetById(requestID);
            var citizen = SessionHelper.LoggedCitizen;

            MethodResult result;

            if ((result = partyService.CanCancelJoinRequest(request, citizen)).IsError)
            {
                return(RedirectBackWithError(result));
            }

            partyService.CancelJoinRequest(request);
            return(RedirectBackWithSuccess("You successfully removed join request."));
        }