Revert "Old partial attempt at "public mode""

This reverts commit 8f6b030ca8.
This commit is contained in:
Wingy 2020-10-29 11:25:05 -04:00
parent 8f6b030ca8
commit 066d72b153
6 changed files with 18 additions and 37 deletions

View file

@ -1,11 +0,0 @@
const verifyAuth = require('./verifyAuth')
const middlewareNoop = ( (_1, _2, next) => next() )
const publicMiddleware = () => process.env.LISTS_PUBLIC === 'true' ?
(req, res, next) => {
if (!req.user) req.user = { _id: 'Unknown' }
next()
}
: verifyAuth()
module.exports = publicMiddleware