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

            var request  = new AdminAcceptInviteRequest(model.Token, model.Email, model.FirstName, model.LastName, model.Password);
            var response = await _adminService.AcceptSuperAdminUserInvite(request);

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

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