diff --git a/routes/dns.js b/routes/dns.js index b82bd65..ae6e8fa 100644 --- a/routes/dns.js +++ b/routes/dns.js @@ -25,10 +25,11 @@ router.get('/dns/edit/:domainId', authMw.AllowIfAuthenticated, async (req, res, return next(); const fullDomain = result.domain + "." + result.tld; - let records = await GetAllRecords(fullDomain); + const rawRecords = await GetAllRecords(fullDomain); + let records = []; - for(let i = 0; i < records.length; i++) { - console.log(records[i]); + for(const [key, value] of Object.entries(rawRecords)) { + records.push({key: value}); } res.render('dns', {title: pageTitle, domain: result, dnsRecords: records});