Beispiel #1
0
        public InvitationDTO GetInviteeInvitation(long invitationID, long inviteeID)
        {
            var invitation = _invitationService.Find(invitationID);

            if (invitation == null)
            {
                throw new NotFoundException(ErrorCodes.InvitationNotFound);
            }

            var checkInviteeAllowance = _inviteeService.GetInviteeByID(inviteeID, invitationID);

            if (checkInviteeAllowance == null)
            {
                throw new NotFoundException(ErrorCodes.NoAllowedAccessForInvitation);
            }

            return(Mapper.Map <InvitationDTO>(invitation));
        }