public async Task <IActionResult> Post(string email, int roleType) { bool emailExist = await userRepository.DoesEmailExist(email); if (!emailExist) { Mdls.Invite invite = new Mdls.Invite { Email = email, ParticipationRoleType = (Mdls.RoleType)roleType }; string inviteId = await inviteRepository.Add(invite); await emailProvider.SendEmailAsHtml(email, EmailTemplate.getInviteTemplate(inviteId)); } else { return(BadRequest(new DTOs.Error(ErrorResponses.NVITE_USER_EXIST))); } return(Ok(new ActionResponse { State = true })); }