[Domain] fix api request getting dns records

This commit is contained in:
Luca Haid
2024-03-12 21:48:43 +01:00
parent 6924a944ff
commit 54706bbf48
2 changed files with 5 additions and 1 deletions

View File

@@ -194,6 +194,10 @@ include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php")
methods: {
async showDnsRecordsModal(domain) {
this.dnsRecordsModalLoading = domain
this.dnsRecordsModal = {
domain: null,
records: []
}
const response = await axios.get(window['TT_CONFIG']['DOMAIN_API_URL'] + '?do=getDnsRecords&domain=' + domain)
this.dnsRecordsModal.domain = domain
this.dnsRecordsModal.records = response.data.map(record => {

View File

@@ -142,7 +142,7 @@ class DomainController extends mfBaseController {
}
private function getDnsRecords() {
if (!isset($this->request->domain)) {
if (!empty($this->request->domain)) {
return ["status" => "error", "message" => "No domain specified."];
}