diff --git a/server/routes/server.routes.js b/server/routes/server.routes.js index 7029b41b..e990ccf7 100644 --- a/server/routes/server.routes.js +++ b/server/routes/server.routes.js @@ -2,7 +2,6 @@ import { Router } from 'express'; import { renderIndex } from '../views/index'; import { get404Sketch } from '../views/404Page'; import { userExists } from '../controllers/user.controller'; -import { getProjectAsset } from '../controllers/project.controller'; const router = new Router(); diff --git a/server/utils/isAuthenticated.js b/server/utils/isAuthenticated.js index ea28eca3..bd3f3454 100644 --- a/server/utils/isAuthenticated.js +++ b/server/utils/isAuthenticated.js @@ -1,6 +1,7 @@ export default function isAuthenticated(req, res, next) { if (req.user) { - return next(); + next(); + return; } res.status(403).send({ success: false,