mirror of
https://github.com/YMFE/yapi.git
synced 2024-11-27 04:40:08 +08:00
Merge pull request #704 from lsqlebai/master
fix: mongoose warning 'Error: (node:3819) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead'
This commit is contained in:
commit
1c72a48091
@ -16,7 +16,7 @@ function connect(callback) {
|
||||
mongoose.Promise = global.Promise;
|
||||
|
||||
let config = yapi.WEBCONFIG;
|
||||
let options = {useNewUrlParser: true };
|
||||
let options = {useNewUrlParser: true, useCreateIndex: true};
|
||||
|
||||
if (config.db.user) {
|
||||
options.user = config.db.user;
|
||||
|
Loading…
Reference in New Issue
Block a user