mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-13 06:32:39 +00:00
Updating DB to handle newer versions of mongo
This commit is contained in:
@@ -7,7 +7,7 @@ const dbPath = process.env.MONGODB_URI || process.env.MONGOLAB_URI || 'mongodb:/
|
||||
module.exports = {
|
||||
connect : ()=>{
|
||||
return new Promise((resolve, reject)=>{
|
||||
if(mongoose.connection.readyState == 1){
|
||||
if(mongoose.connection.readyState !== 0){
|
||||
log.warn('DB already connected');
|
||||
return resolve();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user