public async Task ResetPasswordByEmail(ResetPasswordByEmailRequest request) { var user = _userService.GetUserByEmail(request.Email); if (user == null) { throw new ExceptionWithHttpStatus(System.Net.HttpStatusCode.BadRequest, "Email não encontrado!"); } user = _userService.ResetPassword(user.UsuarioId); EmailResetPassword.Enviar(user.Email, user.Name, user.Password); }
public async Task ResetPassword(string usuarioId) { var user = _userService.ResetPassword(new Guid(usuarioId)); EmailResetPassword.Enviar(user.Email, user.Name, user.Password); }