Example #1
0
        public async Task <IActionResult> AcceptInvite(InviteAcceptModel model)
        {
            if (model.IsNotValid())
            {
                model.SetInputModelValues();
                return(View(model));
            }

            var request = new UserAcceptInviteRequest(model.Token, model.Email, model.FirstName, model.LastName, model.Password);

            var response = await OrganizationService.AcceptInvitation(request);

            if (response.Status.IsNotSuccess)
            {
                model.MapMessages(response);
                model.SetInputModelValues();
                return(View(model));
            }

            return(Redirect("/User/AcceptInviteDone"));
        }