✨feature: Add basic template and wire up single domain list
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user