mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
commit
3facd3271f
2 changed files with 2 additions and 8 deletions
|
@ -32,13 +32,7 @@ class ApiHandler {
|
||||||
$tmp->url = '/api/v1/servers/localhost';
|
$tmp->url = '/api/v1/servers/localhost';
|
||||||
$tmp->go();
|
$tmp->go();
|
||||||
|
|
||||||
$v = intval(substr($tmp->json["version"],0,1));
|
$this->apiurl = $tmp->json["url"];
|
||||||
if ($v == 4) {
|
|
||||||
$this->apiurl = $tmp->json["url"];
|
|
||||||
} else {
|
|
||||||
throw new Exception("Unsupported API version");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function curlopts() {
|
private function curlopts() {
|
||||||
|
|
|
@ -64,7 +64,7 @@ class PdnsAPI {
|
||||||
|
|
||||||
if (!isset($zone['serial']) or gettype($zone['serial']) != 'integer') {
|
if (!isset($zone['serial']) or gettype($zone['serial']) != 'integer') {
|
||||||
$api->method = 'POST';
|
$api->method = 'POST';
|
||||||
$api->url = '/localhost/zones';
|
$api->url = '/zones';
|
||||||
$api->content = json_encode($zonedata);
|
$api->content = json_encode($zonedata);
|
||||||
$api->call();
|
$api->call();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue