Beispiel #1
0
        public async Task <Unit> Handle(ResetPasswordCommand command, CancellationToken token)
        {
            var user = await _service.GetUserByPasswordToken(command.PasswordToken, token);

            _service.UpdateUserPassword(user, command.NewPassword);

            _service.InitUserPasswordToken(user);

            _service.UpdateUserRepo(user);

            await _unitOfWork.SaveAsync(token);

            return(Unit.Value);
        }