updated filtering code
This commit is contained in:
@@ -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 }] },
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user