Fix strictQuery warning from new mongoose versions

-Suppress the "DeprecationWarning: Mongoose: the `strictQuery` option will be switched back to `false` by default in Mongoose 7" warning msg when starting the explorer and using any of the scripts that connect to mongo
This commit is contained in:
Joe Uhren
2022-12-16 19:17:37 -07:00
parent ac10031bf8
commit 4047587990
5 changed files with 10 additions and 0 deletions
+2
View File
@@ -359,6 +359,8 @@ if (lib.is_locked([database]) == false) {
dbString = dbString + ':' + settings.dbsettings.port;
dbString = dbString + '/' + settings.dbsettings.database;
mongoose.set('strictQuery', true);
mongoose.connect(dbString, function(err) {
if (err) {
console.log('Error: Unable to connect to database: %s', dbString);