updated filtering code

This commit is contained in:
2025-05-02 16:27:52 +05:30
parent 4153bd2412
commit c84cd055d4
10 changed files with 160 additions and 211 deletions

View File

@@ -43,11 +43,11 @@ export async function listNotifications(
const page = params.page || 1;
const pageSize = params.pageSize || 10;
const sortObj = getSortObject(params, notificationFields);
const filterObj = getFilterObject(params, notificationFields);
const filterObj = getFilterObject(params);
const pipeline: any = [
{
$match: { $and: [{ tenantId: tenantId }, ...filterObj] },
$match: { $and: [{ tenantId: tenantId }, { ...filterObj }] },
},
];