loginForSalesRepClient method

Future<Either<Failure, void>> loginForSalesRepClient(
  1. int id
)

Implementation

Future<Either<Failure, void>> loginForSalesRepClient(
  int id,
) async =>
    request<void>(
      () async {
        final LoginResponse response =
            await loginRemoteDataSource.loginFromSalesRepClient(
          id,
        );
        final AuthenticationInfoEntity authInfoEntity =
            LoginByPasswordMapper.fromResponse(
          response: response,
        );

        await tokenLocalDataSource.writeToken(authInfoEntity.token!);
        _controller.add(AuthenticationStatus.authenticated);
      },
    );