diff --git a/src/routes/DomainRoutes.php b/src/routes/DomainRoutes.php index c9c9aec..4026fc6 100644 --- a/src/routes/DomainRoutes.php +++ b/src/routes/DomainRoutes.php @@ -289,6 +289,10 @@ public function addRoutes($router, $displayEngine, $api) { $router->post('/domain/([^/]+)/addhook(\.json)?', function($domain, $json = NULL) use ($router, $displayEngine, $api) { $domain = urldecode($domain); + + if (isset($_POST['hookurl'])) { $_POST['url'] = $_POST['hookurl']; unset($_POST['hookurl']); } + if (isset($_POST['hookpassword'])) { $_POST['password'] = $_POST['hookpassword']; unset($_POST['hookpassword']); } + $apiresult = $api->createDomainHook($domain, $_POST); $result = ['unknown', 'unknown']; diff --git a/templates/default/domain.tpl b/templates/default/domain.tpl index f4cbced..1f99e4b 100644 --- a/templates/default/domain.tpl +++ b/templates/default/domain.tpl @@ -327,8 +327,8 @@