mirror of
https://github.com/YMFE/yapi.git
synced 2025-02-23 13:59:28 +08:00
fix: db.js mongoose error message
This commit is contained in:
parent
3fa8044eb5
commit
8813d67afc
@ -25,7 +25,10 @@ function connect(callback) {
|
||||
|
||||
|
||||
let db = mongoose.connect(`mongodb://${config.db.servername}:${config.db.port}/${config.db.DATABASE}`, options, function(err){
|
||||
yapi.commons.log(err +'mongodb Authentication failed', 'error');
|
||||
if(err){
|
||||
yapi.commons.log(err +', mongodb Authentication failed', 'error');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
db.then(function () {
|
||||
|
Loading…
Reference in New Issue
Block a user