feature: Add basic template and wire up single domain list

This commit is contained in:
Keith Solomon
2025-05-27 19:05:06 -05:00
parent 1c6e96e94c
commit cfba9672ef
3 changed files with 16 additions and 1496 deletions

View File

@@ -53,12 +53,10 @@ router.get('/domain/:domain', async function (req, res, next) {
return res.status(400).send('Error fetching site: ' + error.message);
}
console.log('Site found:', sites);
if (!sites || sites.length === 0) {
return res.status(404).send('Site not found');
} else {
res.json(sites[0]); // Return the first match
res.render('sites', { title: 'Playwright Testing Dashboard', sites: sites });
}
});