diff --git a/middlewares/auth-middleware.js b/middlewares/auth-middleware.js index deda8e9..44a442b 100644 --- a/middlewares/auth-middleware.js +++ b/middlewares/auth-middleware.js @@ -6,9 +6,6 @@ async function auth (req, res, next) { const user = req.session.user; const isAuth = req.session.isAuthenticated; - if (!user || !isAuth) { - return next(); - } const userDoc = await db.getDb().collection('users').findOne({_id: user.id}) if (userDoc && userDoc.isAdmin) {