env config improvement

This commit is contained in:
Wingy 2020-12-01 22:09:25 -05:00
parent f3cfc6abe0
commit c02510659c
6 changed files with 51 additions and 15 deletions

View file

@ -1,6 +1,6 @@
const verifyAuth = require('./verifyAuth')
const publicMiddleware = () => process.env.LISTS_PUBLIC === 'true'
const publicMiddleware = () => global._CC.config.wishlist.public
? (req, res, next) => {
if (!req.user) req.user = { _id: 'Unknown' }
next()