Skip to content

Commit

Permalink
Merge pull request #1 from WhitebearTeam/develop
Browse files Browse the repository at this point in the history
feat: use mongoose 5 and remove warnings
  • Loading branch information
sebacura authored Jun 22, 2024
2 parents 6e5ba11 + 78eca9b commit 625a5f1
Show file tree
Hide file tree
Showing 6 changed files with 1,728 additions and 474 deletions.
2 changes: 1 addition & 1 deletion admin/public/js/packages.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions lib/core/openDatabaseConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ module.exports = function openDatabaseConnection (callback) {
rs_name: replicaData.db.replicaSetOptions.rs_name,
readPreference: replicaData.db.replicaSetOptions.readPreference,
},
useMongoClient: true,
useNewUrlParser: true,
useUnifiedTopology: true

};

debug('connecting to replica set');
Expand All @@ -42,8 +44,7 @@ module.exports = function openDatabaseConnection (callback) {
debug('connecting to mongo');
keystone.initDatabaseConfig();
var mongo_options = keystone.get('mongo options') || {};
mongo_options.useMongoClient = true;
keystone.mongoose.connect(keystone.get('mongo'), mongo_options);
keystone.mongoose.connect(keystone.get('mongo'), { useNewUrlParser: true, useUnifiedTopology: true }, mongo_options);
}

keystone.mongoose.connection.on('error', function (err) {
Expand Down
Loading

0 comments on commit 625a5f1

Please sign in to comment.