MX records need ability to set priority

This commit is contained in:
Darin Randal
2018-03-05 11:38:18 -05:00
parent a628cac283
commit e18a64e7e4

View File

@@ -28,6 +28,7 @@ class DNS implements API
* @param string $content
* @param int $ttl
* @param bool $proxied
* @param string $priority
* @return bool
*/
public function addRecord(
@@ -36,7 +37,8 @@ class DNS implements API
string $name,
string $content,
int $ttl = 0,
bool $proxied = true
bool $proxied = true,
string $priority = ''
): bool {
$options = [
'type' => $type,
@@ -49,6 +51,10 @@ class DNS implements API
$options['ttl'] = $ttl;
}
if (!empty($priority)) {
$options['priority'] = $priority;
}
$user = $this->adapter->post('zones/' . $zoneID . '/dns_records', [], $options);
$body = json_decode($user->getBody());