From 23afd27241662f47051f8399683259e3368c8b11 Mon Sep 17 00:00:00 2001 From: Chris Ruppel Date: Thu, 19 Oct 2023 13:45:13 +0200 Subject: [PATCH] fix: explicitly set DB option to suppress deprecation warning 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 --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index 1901a4dd..9e6ff331 100644 --- a/server.js +++ b/server.js @@ -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();