0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-08 16:12:38 +00:00

"Added new route for '/vault' and updated catch-all for invalid routes"

This commit is contained in:
Víctor Losada Hernández
2024-08-31 19:35:44 +02:00
parent c7f695e86a
commit f7c3e81b7b

View File

@@ -434,6 +434,11 @@ if(isLocalEnvironment){
}); });
} }
//Vault Page
app.get('/vault', asyncHandler(async(req, res, next)=>{
return next();
}));
//Send rendered page //Send rendered page
app.use(asyncHandler(async (req, res, next)=>{ app.use(asyncHandler(async (req, res, next)=>{
if (!req.route) return res.redirect('/'); // Catch-all for invalid routes if (!req.route) return res.redirect('/'); // Catch-all for invalid routes