mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: mongo collection stats
This commit is contained in:
@@ -158,7 +158,7 @@ mongoModule.info = async function (db) {
|
|||||||
|
|
||||||
async function getCollectionStats(db) {
|
async function getCollectionStats(db) {
|
||||||
const items = await db.listCollections().toArray();
|
const items = await db.listCollections().toArray();
|
||||||
return await Promise.all(items.map(collection => db.collection(collection.name).stats));
|
return await Promise.all(items.map(collection => db.collection(collection.name).stats()));
|
||||||
}
|
}
|
||||||
|
|
||||||
mongoModule.close = function (callback) {
|
mongoModule.close = function (callback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user