updated filtering code
This commit is contained in:
@@ -33,13 +33,13 @@ export async function listViews(
|
||||
const page = params.page || 1;
|
||||
const pageSize = params.pageSize || 10;
|
||||
const sortObj = getSortObject(params, viewFields);
|
||||
const filterObj = getFilterObject(params, viewFields);
|
||||
const filterObj = getFilterObject(params);
|
||||
|
||||
return await viewModel.find({
|
||||
$and: [
|
||||
{ tenantId: user.tenantId },
|
||||
{ createdBy: user.userId },
|
||||
...filterObj,
|
||||
{ ...filterObj },
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user