From f19f17ea6f7689d880b39d531be597cf37dc9156 Mon Sep 17 00:00:00 2001 From: Bart Vrancken Date: Sat, 6 Oct 2018 23:47:25 +0200 Subject: [PATCH] Update DNS.php --- src/Endpoints/DNS.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Endpoints/DNS.php b/src/Endpoints/DNS.php index dc57566..6bc6ad6 100644 --- a/src/Endpoints/DNS.php +++ b/src/Endpoints/DNS.php @@ -29,6 +29,7 @@ class DNS implements API * @param int $ttl * @param bool $proxied * @param string $priority + * @param array $data * @return bool */ public function addRecord( @@ -38,7 +39,8 @@ class DNS implements API string $content, int $ttl = 0, bool $proxied = true, - string $priority = '' + string $priority = '', + array $data = [] ): bool { $options = [ 'type' => $type, @@ -54,6 +56,10 @@ class DNS implements API if (!empty($priority)) { $options['priority'] = (int)$priority; } + + if (!empty($data)) { + $options['data'] = $data; + } $user = $this->adapter->post('zones/' . $zoneID . '/dns_records', $options);