0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-13 10:52:46 +00:00

Updating DB to handle newer versions of mongo

This commit is contained in:
Scott Tolksdorf
2017-05-28 11:24:50 -04:00
parent 2023ae4f6a
commit b39f9041c2
2 changed files with 9 additions and 8 deletions

View File

@@ -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();
}