From 87f2b57b24c52a1b77f2d6e0e3d98557b68397e1 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Mon, 26 Dec 2022 00:27:20 +0100 Subject: [PATCH] deal with mongoose strict query --- db/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/index.ts b/db/index.ts index b03db5b..8ea344c 100644 --- a/db/index.ts +++ b/db/index.ts @@ -7,6 +7,8 @@ import { uniqueFilter } from '../helpers/array' export const MONGO_URI = process.env.MONGO_URI +mongoose.set('strictQuery', false); + mongoose.connect(process.env.MONGO_URI, { serverSelectionTimeoutMS: 3000, }) @@ -126,4 +128,4 @@ export async function getMilageMax(): Promise { .exec() return billMaxMilageEnd?.milageEnd || 0 -} +} \ No newline at end of file