flattens user into collections
This commit is contained in:
@@ -8,7 +8,6 @@ const connectMongoose = require('./mongoose/connect');
|
||||
const expressMiddleware = require('./express/middleware');
|
||||
const createAuthHeaderFromCookie = require('./express/middleware/createAuthHeaderFromCookie');
|
||||
const initWebpack = require('./webpack/init');
|
||||
const initUser = require('./users/init');
|
||||
const initCollections = require('./collections/init');
|
||||
const initGlobals = require('./globals/init');
|
||||
const initStatic = require('./express/static');
|
||||
@@ -24,7 +23,6 @@ class Payload {
|
||||
this.router = express.Router();
|
||||
this.collections = {};
|
||||
|
||||
this.initUser = initUser.bind(this);
|
||||
this.initCollections = initCollections.bind(this);
|
||||
this.initGlobals = initGlobals.bind(this);
|
||||
this.buildEmail = buildEmail.bind(this);
|
||||
@@ -39,9 +37,6 @@ class Payload {
|
||||
connectMongoose(this.config.mongoURL);
|
||||
this.router.use(...expressMiddleware(this.config));
|
||||
|
||||
// Register and bind User
|
||||
this.initUser();
|
||||
|
||||
// Register collections
|
||||
this.initCollections();
|
||||
|
||||
@@ -49,7 +44,7 @@ class Payload {
|
||||
this.initGlobals();
|
||||
|
||||
// Enable client
|
||||
if (!this.config.disableAdmin && process.env.NODE_ENV !== 'test') {
|
||||
if (!this.config.admin.disable && process.env.NODE_ENV !== 'test') {
|
||||
this.express.use(initWebpack(this.config));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user