gandi: Inline an unnecessary variable

This commit is contained in:
Richard Hansen 2024-07-28 02:09:05 -04:00
parent 5e52f728ad
commit 6f505e6538

View file

@ -6940,16 +6940,15 @@ sub nic_gandi_update {
success("$h: skipped: address was already set to $ip"); success("$h: skipped: address was already set to $ip");
next; next;
} }
my $data = encode_json({
defined($config{$h}{'ttl'}) ? (rrset_ttl => $config{$h}{'ttl'}) : (),
rrset_values => [$ip],
});
$reply = geturl( $reply = geturl(
proxy => opt('proxy'), proxy => opt('proxy'),
url => $url, url => $url,
headers => \@headers, headers => \@headers,
method => 'PUT', method => 'PUT',
data => $data, data => encode_json({
defined($config{$h}{'ttl'}) ? (rrset_ttl => $config{$h}{'ttl'}) : (),
rrset_values => [$ip],
}),
); );
my $ok = header_ok($h, $reply); my $ok = header_ok($h, $reply);
if ($ok) { if ($ok) {