pre-process records

This commit is contained in:
2026-05-14 15:49:03 -04:00
parent 89f8e16a4b
commit b064fdb07c
+4 -3
View File
@@ -25,10 +25,11 @@ router.get('/dns/edit/:domainId', authMw.AllowIfAuthenticated, async (req, res,
return next(); return next();
const fullDomain = result.domain + "." + result.tld; 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++) { for(const [key, value] of Object.entries(rawRecords)) {
console.log(records[i]); records.push({key: value});
} }
res.render('dns', {title: pageTitle, domain: result, dnsRecords: records}); res.render('dns', {title: pageTitle, domain: result, dnsRecords: records});