fix bad references to mongo
This commit is contained in:
parent
d7323b23e9
commit
afa2d9df39
@ -53,7 +53,7 @@ class Server extends EventEmitter {
|
||||
this.mongodb = new MongoDB(this, { options: databases.mongodb, MONGO_HOST, MONGO_USER, MONGO_PORT, MONGO_PASS, MONGO_DB });
|
||||
this.userDatabase = new UserDatabase(this, this.mongodb, { validUserTypes });
|
||||
this.authenticator = new Authenticator(this, this.app, this.userDatabase, {
|
||||
mongo: this.mongodb.client,
|
||||
mongo: this.mongodb,
|
||||
secret: SECRET,
|
||||
discordID: DISCORD_ID,
|
||||
discordScope: discord.scope,
|
||||
|
@ -35,7 +35,7 @@ class Authenticator {
|
||||
if (!(users instanceof AbstractUserDatabase)) Util.fatal(new Error(`Expecting user database to be an instance inheriting AbstractUserDatabase`));
|
||||
this.userdb = users;
|
||||
|
||||
if (!mongo) Util.fatal(new Error('Missing mongo client for '));
|
||||
if (!mongo) Util.fatal(new Error('Missing mongo client for session store'));
|
||||
|
||||
this.logger = server.createLogger(this);
|
||||
|
||||
@ -43,7 +43,7 @@ class Authenticator {
|
||||
cookie.secure = cookie.secure && process.env.NODE_ENV !== 'development';
|
||||
express.use(session({
|
||||
cookie,
|
||||
store: MongoStore.create({ client: mongo, dbName: 'sessions' }),
|
||||
store: MongoStore.create({ client: mongo.client, dbName: mongo.database, touchAfter: 600 }),
|
||||
secret,
|
||||
resave: false,
|
||||
saveUninitialized: true
|
||||
|
Loading…
Reference in New Issue
Block a user