fix: domain should not be null

This commit is contained in:
Maël Gangloff
2024-12-08 14:19:54 +01:00
parent 05bc8dce47
commit d77dcf0ada
2 changed files with 4 additions and 4 deletions

View File

@@ -35,11 +35,11 @@ readonly class InfluxdbService
]); ]);
} }
public function addRdapQueryPoint(RdapServer $rdapServer, Domain $domain, array $info): void public function addRdapQueryPoint(RdapServer $rdapServer, string $ldhName, array $info): void
{ {
$this->writePoints(new Point('rdap_query', [ $this->writePoints(new Point('rdap_query', [
'domain' => $domain->getLdhName(), 'ldh_name' => $ldhName,
'tld' => $domain->getTld()->getTld(), 'tld' => $rdapServer->getTld()->getTld(),
'rdap_server' => $rdapServer->getUrl(), 'rdap_server' => $rdapServer->getUrl(),
'primary_ip' => $info['primary_ip'], 'primary_ip' => $info['primary_ip'],
], [ ], [

View File

@@ -167,7 +167,7 @@ readonly class RDAPService
throw $e; throw $e;
} finally { } finally {
if ($this->influxdbEnabled && isset($req)) { if ($this->influxdbEnabled && isset($req)) {
$this->influxService->addRdapQueryPoint($rdapServer, $domain, $req->getInfo()); $this->influxService->addRdapQueryPoint($rdapServer, $idnDomain, $req->getInfo());
} }
} }