From e9bba4bdf56b6b8530c710c1f2567aec2a2c658a Mon Sep 17 00:00:00 2001 From: Akhil Meka Date: Wed, 9 Apr 2025 14:31:20 +0530 Subject: [PATCH] fixed filter bug --- src/utils/queryParser.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/utils/queryParser.ts b/src/utils/queryParser.ts index 5e735ca..bbc4b9a 100644 --- a/src/utils/queryParser.ts +++ b/src/utils/queryParser.ts @@ -1,10 +1,7 @@ import mongoose from "mongoose"; type ParsedQuery = Array< - Record< - string, - Record<"$eq" | "$neq" | "$in" | "$nin", string | Date | Object> - > + Record> >; function convertValue(value: any) { @@ -43,7 +40,7 @@ export function parse(query: string, validFields: Array): ParsedQuery { if (char === "=") { op = "$eq"; } else { - op = "$neq"; + op = "$ne"; i++; }