mongodb
This commit is contained in:
parent
11db8b9d3e
commit
1e373c1986
1 changed files with 0 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue