import Site from '@kinsta/rdb/rethinkModels/Site'
import rlNameServerChecker from '@src/server/resourceLoaders/domain/nameServerCheck'

const idCompany = await Site.getTable()
    .get(siteDomain.idSite)('idCompany')
    .run()

  const { idDomain } = await rlNameServerChecker.refresh(
    siteDomain.name,
    idCompany
  )
  const usesKinstaDns = !!idDomain