mirror of
https://github.com/nodemailer/wildduck.git
synced 2024-11-10 09:32:28 +08:00
fixed db connections
This commit is contained in:
parent
9d3453d645
commit
0fea3840ff
1 changed files with 3 additions and 3 deletions
|
@ -40,17 +40,17 @@ module.exports.connect = callback => {
|
|||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
module.exports.gridfs = gdb;
|
||||
module.exports.gridfs = gdb || db;
|
||||
getDBConnection(db, config.dbs.users, (err, udb) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
module.exports.users = udb;
|
||||
module.exports.users = udb || db;
|
||||
getDBConnection(db, config.dbs.sender, (err, sdb) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
module.exports.senderDb = sdb;
|
||||
module.exports.senderDb = sdb || db;
|
||||
|
||||
module.exports.redisConfig = tools.redisConfig(config.dbs.redis);
|
||||
module.exports.redis = new Redis(module.exports.redisConfig);
|
||||
|
|
Loading…
Reference in a new issue