✨feature: Add success message display for site creation
This commit is contained in:
@@ -82,7 +82,9 @@ router.post('/add', async function (req, res, next) {
|
||||
if (!newSite) {
|
||||
res.status(400).send('Error creating site');
|
||||
} else {
|
||||
res.status(201).json(newSite);
|
||||
// res.status(201).json(newSite);
|
||||
const sites = await siteModel.getAll();
|
||||
res.render('index', { title: 'Playwright Testing Dashboard', sites: sites, msg: 'Site created successfully!' });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user