Skip to content

Commit

Permalink
fix: explicitly set DB option to suppress deprecation warning
Browse files Browse the repository at this point in the history
The value we set is the current default for Mongoose 6, but
the default will change to false in Mongoose 7. Therefore the
warning was popping up.

The more conservative option is false, meaning invalid
query parameters do NOT result in entire collections
getting returned.

Refs: HID-2395
  • Loading branch information
rupl committed Oct 19, 2023
1 parent 21823e1 commit 23afd27
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ exports.init = async () => {
// Define server start
exports.start = async () => {
// Connect to DB
mongoose.set('strictQuery', false);
mongoose.connect(store.uri, store.options);

await server.start();
Expand Down

0 comments on commit 23afd27

Please sign in to comment.