public JsonResult DeclineInvite(int inviteID) { var invite = partyInviteRepository.GetById(inviteID); var citizen = SessionHelper.LoggedCitizen; MethodResult result; if ((result = partyService.CanDeclineInvite(invite, citizen)).IsError) { return(JsonError(result)); } partyService.DeclineInvite(invite); return(JsonSuccess("You declined party invite.")); }