return full domain object on Domains.update() call, fixes #861
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -1766,7 +1766,10 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
|
||||
$idna_convert = new \Froxlor\Idna\IdnaWrapper();
|
||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] updated domain '" . $idna_convert->decode($result['domain']) . "'");
|
||||
return $this->response(200, "successful", $update_data);
|
||||
$result = $this->apiCall('Domains.get', array(
|
||||
'domainname' => $result['domain']
|
||||
));
|
||||
return $this->response(200, "successful", $result);
|
||||
}
|
||||
throw new \Exception("Not allowed to execute given command.", 403);
|
||||
}
|
||||
|
||||
@@ -155,6 +155,7 @@ class DomainsTest extends TestCase
|
||||
$json_result = Domains::getLocal($reseller_userdata, $data)->update();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEmpty($result['ssl_protocols']);
|
||||
$this->assertEquals('test2.local', $result['domain']);
|
||||
}
|
||||
|
||||
public function testAdminDomainsAddSysHostname()
|
||||
@@ -206,6 +207,7 @@ class DomainsTest extends TestCase
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(1, $result['email_only']);
|
||||
$this->assertFalse(in_array('TLSv1.3', explode(",", $result['ssl_protocols'])));
|
||||
$this->assertEquals('test.local', $result['domain']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user