Redirect to home on successfully ading a new site
This commit is contained in:
@@ -59,7 +59,7 @@ router.post('/add', async function (req, res, next) {
|
|||||||
if (!newSite) {
|
if (!newSite) {
|
||||||
res.status(400).send('Error creating site');
|
res.status(400).send('Error creating site');
|
||||||
} else {
|
} else {
|
||||||
res.status(201).json(newSite);
|
res.redirect('/'); // status 304
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user