This commit is contained in:
Jan Prochazka
2022-12-30 10:30:38 +01:00
parent 646a83b288
commit 380ab2e69e
5 changed files with 25 additions and 11 deletions

View File

@@ -258,7 +258,7 @@ const driver = {
const count = await collection.countDocuments(convertObjectId(options.condition) || {});
return { count };
} else if (options.aggregate) {
let cursor = await collection.aggregate(options.aggregate);
let cursor = await collection.aggregate(convertObjectId(options.aggregate));
const rows = await cursor.toArray();
return { rows: rows.map(transformMongoData) };
} else {