start DNS configuration

This commit is contained in:
2026-05-14 14:45:14 -04:00
parent 21b87a3eb8
commit a257298436
4 changed files with 21 additions and 4 deletions
+5 -2
View File
@@ -6,7 +6,7 @@ const database = require('../database.js');
const dbConnection = database.db;
const Sequelize = require('sequelize');
const pageTitle = 'Domain Manager | Edit DNS';
const { GetAllRecords } = require('../coredns_bridge.js');
// Manage domains
router.get('/dns/edit/:domainId', authMw.AllowIfAuthenticated, async (req, res, next) => {
@@ -24,7 +24,10 @@ router.get('/dns/edit/:domainId', authMw.AllowIfAuthenticated, async (req, res,
if(!result)
return next();
res.render('dns', {title: pageTitle, domain: result});
const fullDomain = result.domain + "." + result.tld;
let records = GetAllRecords(fullDomain);
res.render('dns', {title: pageTitle, domain: result, dnsRecords: records});
});
module.exports = router;