fix/middleware+404 handling block plans

This commit is contained in:
SowinskiBraeden committed 2025-05-07 16:24:09 -07:00
1 parent 640ae859e5
commit ddf07eee11
1 file changed
+1 -1
+1 -1
View File
@@ -13,7 +13,7 @@ const userRoutes = userRouter.stack.map((layer) => layer.route.path.split("/")[1
const createMiddleware = (users) => {
return async (req, res, next) => {
// Redirect not found pages to 404 page
if (!userRoutes.includes(req.url.substring(1))) {
if (!userRoutes.includes(req.url.split("/")[1])) {
return res.status(status.NotFound).redirect("/notFound");
}