public ActionResult RequestChangeMailAddress(string teamCode) { try { var model = new RequestChangeMailAddressViewModel(); model.TeamCode = teamCode; return(this.View(model)); } catch (NotFoundException) { return(this.NotFound()); } }
public async Task <ActionResult> RequestChangeMailAddress([Bind("TeamCode,MailAddress")] RequestChangeMailAddressViewModel viewModel) { try { var authorizationLink = await this.useCase.AddAuthorizationLink(viewModel.TeamCode); await this.useCase.SendChangeMailAddressVerifyMail(authorizationLink.AuthorizationCode, viewModel.MailAddress, Options.DomainUrl); return(this.RedirectToAction(nameof(Edit), new { teamCode = viewModel.TeamCode })); } catch (NotFoundException) { return(this.NotFound()); } }